From 81c9409ee7114d44a73dcc2ec18f4669d547f8b8 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 14:08:53 +0100 Subject: [PATCH 1/6] Add travis build --- .travis.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ab0fe6d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,45 @@ +language: rust + +rust: + - stable + - beta + - nightly + +os: + - linux + +before_install: + - sudo apt-get install -y libwayland-dev + +branches: + only: + - master + +before_script: + - | + pip install 'travis-cargo<0.2' --user && + export PATH=$HOME/.local/bin:$PATH + +script: + - | + travis-cargo build && + travis-cargo test && + travis-cargo --only stable doc + +after_success: + - travis-cargo --only stable doc-upload + +env: + global: + # override the default `--features unstable` used for the nightly branch (optional) + - TRAVIS_CARGO_NIGHTLY_FEATURE="" + - secure: A/zuPuIu03Z+rqnDS/NNNjbXrg8Nc9lEGKzcBdpHgnyd23z37zreEEAKzFhjJKMx0np0ntDo5LVeLgT6d7fGaDFsJrBZHej3pxuG81MAJdLEmJNaCLCc1eCbwDHgJkEJ5HsblHTrYK0RjBvNL5I8+URuzEqXkwVr7UHJv5px1ZA= + +notifications: + webhooks: + urls: + - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA" + on_success: change + on_failure: always + on_start: never + From bfc09a0a990869e61e14db331ba3635b8e1bbc86 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 14:23:20 +0100 Subject: [PATCH 2/6] Use a more recent image in travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ab0fe6d..2c89c29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ rust: os: - linux +dist: trusty + before_install: - sudo apt-get install -y libwayland-dev From 62c9fee09ddde6b702450824ad41f4b971ba6163 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 14:31:36 +0100 Subject: [PATCH 3/6] Add XDG_RUNTIME_DIR and RUST_BACKTRACE --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2c89c29..2455963 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,9 @@ before_script: - | pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH + - | + mkdir $(pwd)/socket && + export XDG_RUNTIME_DIR="$(pwd)/socket" script: - | @@ -35,6 +38,7 @@ env: global: # override the default `--features unstable` used for the nightly branch (optional) - TRAVIS_CARGO_NIGHTLY_FEATURE="" + - RUST_BACKTRACE=1 - secure: A/zuPuIu03Z+rqnDS/NNNjbXrg8Nc9lEGKzcBdpHgnyd23z37zreEEAKzFhjJKMx0np0ntDo5LVeLgT6d7fGaDFsJrBZHej3pxuG81MAJdLEmJNaCLCc1eCbwDHgJkEJ5HsblHTrYK0RjBvNL5I8+URuzEqXkwVr7UHJv5px1ZA= notifications: From 85eb10ce41d834514ae84a40417b77a152b492a7 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 16:34:43 +0100 Subject: [PATCH 4/6] Donc run tests for now Travis appears to have too old versions of libwayland, and tests seem to crash because of this. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2455963..8171375 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,6 @@ before_script: script: - | travis-cargo build && - travis-cargo test && travis-cargo --only stable doc after_success: From 618fb3a8042227513d73ba92c427273460373a26 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 16:42:56 +0100 Subject: [PATCH 5/6] travis: use cache & container infra To speed-up builds & tests --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8171375..23a9810 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ language: rust +cache: cargo + +sudo: false + rust: - stable - beta @@ -10,8 +14,10 @@ os: dist: trusty -before_install: - - sudo apt-get install -y libwayland-dev +addons: + apt: + packages: + - libwayland-dev branches: only: From 17f8ebb7a978e41bee522c3840f41c139167b007 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 22 Feb 2017 16:46:22 +0100 Subject: [PATCH 6/6] travis: don't build doc for dependencies --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23a9810..69c2b4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_script: script: - | travis-cargo build && - travis-cargo --only stable doc + travis-cargo --only stable doc -- --no-deps after_success: - travis-cargo --only stable doc-upload