diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-09-03 11:08:05 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-09-03 11:08:05 +0200 |
| commit | 6e62c3c65bfe729b9ef2fe5b27721d429b1b2c7e (patch) | |
| tree | 2db216a26c85df4b5e914ebd7818d6e62b0f73fc | |
| parent | 6797d0b7af61116dad96c8aae98633f258f57f72 (diff) | |
| parent | 7c55b2137902a6922c335aa596701250dacf77c6 (diff) | |
| download | mullvadvpn-6e62c3c65bfe729b9ef2fe5b27721d429b1b2c7e.tar.xz mullvadvpn-6e62c3c65bfe729b9ef2fe5b27721d429b1b2c7e.zip | |
Merge branch 'disable-nightly-rust-ci'
| -rw-r--r-- | .travis.yml | 8 | ||||
| -rw-r--r-- | appveyor.yml | 7 | ||||
| -rwxr-xr-x | ci/ci-rust-script.sh (renamed from ci/travis-rust-script.sh) | 19 |
3 files changed, 22 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index 0f69a7e376..6996f7d306 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ matrix: before_script: - env script: - - ./ci/travis-rust-script.sh stable + - ./ci/ci-rust-script.sh stable # Daemon - Linux - os: linux @@ -73,7 +73,7 @@ matrix: - docker run -d --name mvd-build -v $(pwd):/travis -w /travis mullvadvpn/mullvadvpn-app-build:latest tail -f /dev/null - docker ps script: - - docker exec -t mvd-build bash ci/travis-rust-script.sh nightly + - docker exec -t mvd-build bash ci/ci-rust-script.sh nightly - os: linux name: Daemon - beta Rust @@ -82,7 +82,7 @@ matrix: services: docker before_script: *rust_before_script script: - - docker exec -t mvd-build bash ci/travis-rust-script.sh beta + - docker exec -t mvd-build bash ci/ci-rust-script.sh beta - os: linux name: Daemon - stable Rust @@ -91,7 +91,7 @@ matrix: services: docker before_script: *rust_before_script script: - - docker exec -t mvd-build bash ci/travis-rust-script.sh stable + - docker exec -t mvd-build bash ci/ci-rust-script.sh stable notifications: diff --git a/appveyor.yml b/appveyor.yml index b432333099..8f0698ec15 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,9 +11,7 @@ environment: # overridden on a case by case basis down below RUST_VERSION: stable RUST_BACKTRACE: "1" - RUSTFLAGS: "--deny unused_imports --deny dead_code" CPP_BUILD_MODES: "Debug" - OPENSSL_STATIC: "1" # These are all the build jobs. Adjust as necessary. Comment out what you # don't need @@ -49,10 +47,7 @@ install: # This is the "test phase", tweak it as you see fit test_script: - - ps: . .\env.ps1 - - bash -x build_windows_modules.sh --dev-build - - cargo build - - cargo test + - bash -x ci/ci-rust-script.sh %RUST_VERSION% # Stops feature branches from triggering two builds (One for branch and one for PR) skip_branch_with_pr: true diff --git a/ci/travis-rust-script.sh b/ci/ci-rust-script.sh index d447cd8ea1..ba4f93e131 100755 --- a/ci/travis-rust-script.sh +++ b/ci/ci-rust-script.sh @@ -1,13 +1,28 @@ +#!/usr/bin/env bash + set -eu + RUST_TOOLCHAIN_CHANNEL=$1 RUSTFLAGS="--deny unused_imports --deny dead_code" source env.sh "" + rustup update $RUST_TOOLCHAIN_CHANNEL rustup default $RUST_TOOLCHAIN_CHANNEL -cargo build --verbose -cargo test --verbose +case "$(uname -s)" in + MINGW*|MSYS_NT*) + ./build_windows_modules.sh --dev-build + ;; +esac + +# FIXME: Becaues of our old jsonrpc dependency our Rust code won't build +# on latest nightly. +if [ "${RUST_TOOLCHAIN_CHANNEL}" != "nightly" ]; then + cargo build --verbose + cargo test --verbose +fi + if [ "${RUST_TOOLCHAIN_CHANNEL}" = "nightly" ]; then rustup component add rustfmt-preview; rustfmt --version; |
