travis: Add a build script for Travis CI.
This currently does a meson build using a docker image I've prepared. The Dockerfile source is at: https://github.com/anholt/xserver-travis Docker proved to be necessary to cut the build time per Travis push. If some day we end up using meson in more of the X stack, we may be able to move more dependencies out of the docker image and into the CI build (putting the I in CI). Until then, we'll have to do docker image rebuilds when dependencies are added/updated. To enable Travis CI on your github repository, see the first two steps of the docs at: https://docs.travis-ci.com/user/getting-started/ Once you do that, pushing branches to your github repo will trigger builds, which will send you email if they fail. Current build status can be veiewed your account on travis-ci.org: https://travis-ci.org/anholt/xserver
This commit is contained in:
parent
fda2b064a0
commit
01dfb65ee2
14
.travis.yml
Normal file
14
.travis.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
language: c
|
||||||
|
dist: trusty
|
||||||
|
services: docker
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v3 > Dockerfile ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi
|
12
test/scripts/build-travis-deps.sh
Executable file
12
test/scripts/build-travis-deps.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export PREFIX=/usr
|
||||||
|
export TRAVIS_BUILD_DIR=/root
|
||||||
|
export PIGLIT_DIR=$TRAVIS_BUILD_DIR/piglit
|
||||||
|
export XTEST_DIR=$TRAVIS_BUILD_DIR/xtest
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
meson build/
|
||||||
|
ninja -C build/ install
|
||||||
|
ninja -C build/ test
|
Loading…
Reference in New Issue
Block a user