diff --git a/.travis.yml b/.travis.yml index de0e685..fcb427f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,9 @@ os: rust: - 1.37.0 -- stable -- beta -- nightly + - stable + - beta + - nightly script: - cargo build --verbose diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 1b686a4..13d3768 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -1,58 +1,58 @@ jobs: -- job: ${{ parameters.name }} - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - stable: - rustup_toolchain: stable - beta: - rustup_toolchain: beta - nightly: - rustup_toolchain: nightly - steps: - # Linux and macOS. - - ${{ if ne(parameters.name, 'Windows') }}: - - script: | - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN - echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" - displayName: Install rust - # Windows. - - ${{ if eq(parameters.name, 'Windows') }}: - - script: | - curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" - displayName: Install rust (windows) - # All platforms. - - script: | - rustc -Vv - cargo -V - displayName: Query rust and cargo versions - - script: cargo build - displayName: Build - - script: | - cargo test --all --verbose - cargo test --release --all --verbose - displayName: Test - # Linux and macOS w/nightly toolchain. - # Ideally we'd only run the script for the nightly toolchain, but I can't - # figure out how to determine that within the Azure Pipelines conditional. - - ${{ if ne(parameters.name, 'Windows') }}: - - script: | - export RUST_BACKTRACE=1 - if [ "$RUSTUP_TOOLCHAIN" = "nightly" ] - then cargo bench --all --verbose; - fi - displayName: Bench - # Windows w/nightly toolchain. - # Ideally we'd only run the script for the nightly toolchain, but I can't - # figure out how to determine that within the Azure Pipelines conditional. - - ${{ if eq(parameters.name, 'Windows') }}: - - script: | - SET RUST_BACKTRACE=1 - if "%RUSTUP_TOOLCHAIN%" == "nightly" ( - cargo bench --all --verbose - ) - displayName: Bench + - job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + stable: + rustup_toolchain: stable + beta: + rustup_toolchain: beta + nightly: + rustup_toolchain: nightly + steps: + # Linux and macOS. + - ${{ if ne(parameters.name, 'Windows') }}: + - script: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + displayName: Install rust + # Windows. + - ${{ if eq(parameters.name, 'Windows') }}: + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% + set PATH=%PATH%;%USERPROFILE%\.cargo\bin + echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" + displayName: Install rust (windows) + # All platforms. + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions + - script: cargo build + displayName: Build + - script: | + cargo test --all --verbose + cargo test --release --all --verbose + displayName: Test + # Linux and macOS w/nightly toolchain. + # Ideally we'd only run the script for the nightly toolchain, but I can't + # figure out how to determine that within the Azure Pipelines conditional. + - ${{ if ne(parameters.name, 'Windows') }}: + - script: | + export RUST_BACKTRACE=1 + if [ "$RUSTUP_TOOLCHAIN" = "nightly" ] + then cargo bench --all --verbose; + fi + displayName: Bench + # Windows w/nightly toolchain. + # Ideally we'd only run the script for the nightly toolchain, but I can't + # figure out how to determine that within the Azure Pipelines conditional. + - ${{ if eq(parameters.name, 'Windows') }}: + - script: | + SET RUST_BACKTRACE=1 + if "%RUSTUP_TOOLCHAIN%" == "nightly" ( + cargo bench --all --verbose + ) + displayName: Bench diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5666af5..0e2afc5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,15 +1,15 @@ jobs: -- template: azure-pipelines-template.yml - parameters: - name: macOS - vmImage: macOS-10.13 + - template: azure-pipelines-template.yml + parameters: + name: macOS + vmImage: macOS-10.13 -- template: azure-pipelines-template.yml - parameters: - name: Linux - vmImage: ubuntu-16.04 + - template: azure-pipelines-template.yml + parameters: + name: Linux + vmImage: ubuntu-16.04 -- template: azure-pipelines-template.yml - parameters: - name: Windows - vmImage: vs2017-win2016 + - template: azure-pipelines-template.yml + parameters: + name: Windows + vmImage: vs2017-win2016