Travis build for MOD devices
This commit is contained in:
parent
4695656ea5
commit
14f6b09d61
6 changed files with 44 additions and 4 deletions
11
.travis.yml
11
.travis.yml
|
|
@ -135,6 +135,17 @@ jobs:
|
|||
script: .travis/script_osx.sh
|
||||
after_success: .travis/prepare_tarball.sh
|
||||
|
||||
- name: "MOD devices arm"
|
||||
stage: "Build"
|
||||
env:
|
||||
- CONTAINER=jpcima/mod-plugin-builder
|
||||
- CROSS_COMPILE=moddevices-arm
|
||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-moddevices"
|
||||
before_install: .travis/before_install_moddevices.sh
|
||||
install: .travis/install_moddevices.sh
|
||||
script: .travis/script_moddevices.sh
|
||||
after_success: .travis/prepare_tarball.sh
|
||||
|
||||
- stage: "Deploy"
|
||||
name: "Source packaging"
|
||||
if: (tag IS present) AND (branch = master) AND (type = push)
|
||||
|
|
|
|||
6
.travis/before_install_moddevices.sh
Executable file
6
.travis/before_install_moddevices.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
. .travis/docker_container.sh
|
||||
|
||||
buildenv bash -c "echo Hello from container" # ensure to start the container
|
||||
|
|
@ -1,15 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$CONTAINER" ]; then
|
||||
echo "The variable CONTAINER is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildenv() {
|
||||
setup_container "$CONTAINER"
|
||||
docker exec -w "$(pwd)" -i -t "$container" "$@"
|
||||
docker exec -w "$(pwd)" -u "$(id -u)" -i -t "$container" "$@"
|
||||
}
|
||||
|
||||
buildenv_as_root() {
|
||||
setup_container "$CONTAINER"
|
||||
docker exec -w "$(pwd)" -u 0 -i -t "$container" "$@"
|
||||
}
|
||||
|
||||
setup_container() {
|
||||
if [ -f ${TRAVIS_BUILD_DIR}/docker-container-id ]; then
|
||||
container=$(cat ${TRAVIS_BUILD_DIR}/docker-container-id)
|
||||
else
|
||||
container=$(docker run -d -i -t -v /home:/home "$1" /bin/bash)
|
||||
container=$(docker run -d -i -t -v /home/travis:/home/travis "$1" /bin/bash)
|
||||
echo "$container" > ${TRAVIS_BUILD_DIR}/docker-container-id
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
set -ex
|
||||
. .travis/docker_container.sh
|
||||
|
||||
buildenv pacman -Sqy --noconfirm
|
||||
buildenv pacman -Sq --noconfirm base-devel wget mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
||||
buildenv_as_root pacman -Sqy --noconfirm
|
||||
buildenv_as_root pacman -Sq --noconfirm base-devel wget mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
||||
buildenv i686-w64-mingw32-gcc -v && buildenv i686-w64-mingw32-g++ -v && buildenv i686-w64-mingw32-cmake --version
|
||||
|
|
|
|||
4
.travis/install_moddevices.sh
Executable file
4
.travis/install_moddevices.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
. .travis/docker_container.sh
|
||||
9
.travis/script_moddevices.sh
Executable file
9
.travis/script_moddevices.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
. .travis/docker_container.sh
|
||||
|
||||
mkdir -p build/${INSTALL_DIR} && cd build
|
||||
|
||||
buildenv mod-plugin-builder /usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF ..
|
||||
buildenv mod-plugin-builder make -j
|
||||
Loading…
Add table
Reference in a new issue