diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-10-16 14:36:13 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-10-16 14:36:13 +0200 |
| commit | 00005c0f118b7e64b39bf6e93ccce5f129536c4e (patch) | |
| tree | 8ea2a9c6921be2b9d4690358efb0d3e46fa753c1 | |
| parent | 5cc049a92ae655a94681d0fecef403995b6f6863 (diff) | |
| parent | a615861be16da45c5bf54a769cdef9db16587628 (diff) | |
| download | mullvadvpn-00005c0f118b7e64b39bf6e93ccce5f129536c4e.tar.xz mullvadvpn-00005c0f118b7e64b39bf6e93ccce5f129536c4e.zip | |
Merge branch 'build-windows-on-travis'
| -rw-r--r-- | .travis.yml | 47 | ||||
| -rw-r--r-- | appveyor.yml | 63 | ||||
| -rw-r--r-- | appveyor_gui.yml | 29 | ||||
| -rwxr-xr-x | ci/ci-rust-script.sh | 6 |
4 files changed, 45 insertions, 100 deletions
diff --git a/.travis.yml b/.travis.yml index cafe1b5480..8f0e034af2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,22 +11,38 @@ matrix: # GUI - Electron - language: node_js node_js: '12' + name: Desktop Frontend, Linux cache: npm services: - xvfb before_install: - npm install -g npm - install: + install: &node_install + - npm --version + - node --version - cd gui - npm ci --no-optional - script: + script: &node_script - npm run check-format - npm run lint - npm run build - npm test + - os: windows + language: node_js + node_js: '12' + name: Desktop Frontend, Windows + cache: npm + before_install: + # npm fails to upgrade itself if just doing `npm install -g npm`. See this issue: + # https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/5 + - node `npm prefix -g`/node_modules/npm/bin/npm-cli.js i -g npm@latest + install: *node_install + script: *node_script + # Android - language: android + name: Android sudo: true android: components: @@ -65,6 +81,7 @@ matrix: # Daemon - macOS - language: rust rust: stable + name: Daemon, macOS - stable Rust os: osx before_script: - env @@ -73,7 +90,7 @@ matrix: # Daemon - Linux - os: linux - name: Daemon - nigtly Rust + name: Daemon, Linux - nigtly Rust language: minimal dist: xenial services: docker @@ -84,7 +101,7 @@ matrix: - docker exec -t mvd-build bash ci/ci-rust-script.sh nightly - os: linux - name: Daemon - beta Rust + name: Daemon, Linux - beta Rust language: minimal dist: xenial services: docker @@ -93,7 +110,7 @@ matrix: - docker exec -t mvd-build bash ci/ci-rust-script.sh beta - os: linux - name: Daemon - stable Rust + name: Daemon, Linux - stable Rust language: minimal dist: xenial services: docker @@ -101,6 +118,26 @@ matrix: script: - docker exec -t mvd-build bash ci/ci-rust-script.sh stable + # Daemon - Windows + - os: windows + name: Daemon, Windows - stable Rust + env: RUST_VERSION=stable + language: bash + install: &rust_windows_install + - curl -sSf -o rustup-init.exe https://win.rustup.rs/ + - ./rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain $RUST_VERSION --profile minimal + - export PATH="$HOME/.cargo/bin/:$PATH" + - export PATH="/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/amd64/:$PATH" + script: &rust_windows_script + - ./ci/ci-rust-script.sh $RUST_VERSION + + - os: windows + name: Daemon, Windows - beta Rust + env: RUST_VERSION=beta + language: bash + install: *rust_windows_install + script: *rust_windows_script + notifications: email: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index e1af1d1e20..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Based on the "trust" template v0.1.1 -# https://github.com/japaric/trust/tree/v0.1.1 - -image: Visual Studio 2017 -platform: - - x64 - -environment: - global: - # This is the Rust channel that build jobs will use by default but can be - # overridden on a case by case basis down below - RUST_VERSION: stable - RUST_BACKTRACE: "1" - CPP_BUILD_MODES: "Debug" - - # These are all the build jobs. Adjust as necessary. Comment out what you - # don't need - matrix: - - TARGET: x86_64-pc-windows-msvc - CPP_BUILD_TARGETS: "x64" - - # Testing other channels - - TARGET: x86_64-pc-windows-msvc - CPP_BUILD_TARGETS: "x64" - RUST_VERSION: beta - - TARGET: x86_64-pc-windows-msvc - CPP_BUILD_TARGETS: "x64" - RUST_VERSION: nightly - -install: - - ps: >- - If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') { - $Env:PATH += ';C:\msys64\mingw64\bin' - } ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') { - $Env:PATH += ';C:\msys64\mingw32\bin' - } - - - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION% --profile minimal - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - # TMP fix for https://github.com/rust-lang-nursery/rustup.rs/issues/893: - - set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\%RUST_VERSION%-%TARGET%\bin - - rustc -Vv - - rustc --print cfg - - cargo -V - - git submodule update --init - -# This is the "test phase", tweak it as you see fit -test_script: - - 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 - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false - -# We build in the test stage, so disable Appveyor's build stage. This prevents -# the "directory does not contain a project or solution file" error. -build: false diff --git a/appveyor_gui.yml b/appveyor_gui.yml deleted file mode 100644 index d405aea46f..0000000000 --- a/appveyor_gui.yml +++ /dev/null @@ -1,29 +0,0 @@ -environment: - nodejs_version: "12" - -install: - - ps: Install-Product node 12 - - npm install -g npm - - npm --version - - node --version - - cd gui - - npm ci --no-optional - -# This is the "test phase", tweak it as you see fit -test_script: - - npm run lint - - npm run build - - npm test - -# Stops feature branches from triggering two builds (One for branch and one for PR) -skip_branch_with_pr: true - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false - -# We build in the test stage, so disable Appveyor's build stage. This prevents -# the "directory does not contain a project or solution file" error. -build: false diff --git a/ci/ci-rust-script.sh b/ci/ci-rust-script.sh index e4f03cc29d..0086936dbc 100755 --- a/ci/ci-rust-script.sh +++ b/ci/ci-rust-script.sh @@ -21,15 +21,15 @@ fi case "$(uname -s)" in MINGW*|MSYS_NT*) - ./build_windows_modules.sh --dev-build + time ./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 --locked --verbose - cargo test --locked --verbose + time cargo build --locked --verbose + time cargo test --locked --verbose fi if [[ "${RUST_TOOLCHAIN_CHANNEL}" == "nightly" && "$(uname -s)" == "Linux" ]]; then |
