From 6f051f9fcdac4b5fbbe83bb85d54f4a11217f74a Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Mon, 24 Jun 2019 19:33:09 -0700 Subject: [PATCH] (ci) Fix CI builds * Update cargo-make * Quote path on windows --- .travis.yml | 6 +++--- _build/azure-pipelines-template.yml | 26 ++++++++++++++++++++------ azure-pipelines.yml | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index c90e8605..88c11b5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,15 +26,15 @@ env: before_script: - | if [ "$TRAVIS_OS_NAME" = 'windows' ]; then - powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.19.1" -target "x86_64-pc-windows-msvc" + powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.20.0" -target "x86_64-pc-windows-msvc" fi - | if [ "$TRAVIS_OS_NAME" = 'linux' ]; then - _build/cargo-make.sh "0.19.1" "x86_64-unknown-linux-musl" + _build/cargo-make.sh "0.20.0" "x86_64-unknown-linux-musl" fi - | if [ "$TRAVIS_OS_NAME" = 'osx' ]; then - _build/cargo-make.sh "0.19.1" "x86_64-apple-darwin" + _build/cargo-make.sh "0.20.0" "x86_64-apple-darwin" fi script: - cargo make workspace-ci-flow --no-workspace diff --git a/_build/azure-pipelines-template.yml b/_build/azure-pipelines-template.yml index c7e6531c..329abcfd 100644 --- a/_build/azure-pipelines-template.yml +++ b/_build/azure-pipelines-template.yml @@ -20,6 +20,7 @@ jobs: # Linux and macOS. - script: | curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN + source /usr/local/cargo/env; echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" displayName: Install rust - ${{ if eq(parameters.name, 'Windows') }}: @@ -37,19 +38,32 @@ jobs: displayName: Query rust and cargo versions - ${{ if eq(parameters.name, 'Linux') }}: # Linux. - - script: _build/cargo-make.sh "0.19.1" "x86_64-unknown-linux-musl" + - script: _build/cargo-make.sh "0.20.0" "x86_64-unknown-linux-musl" displayName: Install cargo-make binary - ${{ if eq(parameters.name, 'macOS') }}: # Mac. - - script: _build/cargo-make.sh "0.19.1" "x86_64-apple-darwin" + - script: _build/cargo-make.sh "0.20.0" "x86_64-apple-darwin" displayName: Install cargo-make binary - ${{ if eq(parameters.name, 'Windows') }}: # Windows. - - script: powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.19.1" -target "x86_64-pc-windows-msvc" + - script: powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.20.0" -target "x86_64-pc-windows-msvc" displayName: Install cargo-make binary - - script: cargo make workspace-ci-flow --no-workspace - env: { CARGO_MAKE_RUN_CODECOV: true } - displayName: Build and run tests + - ${{ if eq(parameters.name, 'Windows') }}: + # Windows. + - script: | + set PATH=%PATH%;%USERPROFILE%\.cargo\bin + cargo make workspace-ci-flow --no-workspace + env: { CARGO_MAKE_RUN_CODECOV: true } + displayName: Build and run tests + - ${{ if ne(parameters.name, 'Windows') }}: + # Not Windows. + - script: | + export PATH="$PATH:$HOME/.cargo/bin"; + source /usr/local/cargo/env; + cargo make workspace-ci-flow --no-workspace + env: { CARGO_MAKE_RUN_CODECOV: true } + displayName: Build and run tests + - script: | rustup target add wasm32-unknown-unknown cargo check --target wasm32-unknown-unknown --package juniper --package juniper_codegen diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7aaed6e0..013a3511 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,7 +82,7 @@ jobs: curl https://sh.rustup.rs -sSf | sh -s -- -y displayName: Install stable Rust - script: | - _build/cargo-make.sh "0.19.1" "x86_64-unknown-linux-musl" + _build/cargo-make.sh "0.20.0" "x86_64-unknown-linux-musl" displayName: Install cargo-make binary - script: | $HOME/.cargo/bin/cargo install cargo-release