# Taken from https://github.com/xoac/rust-azure-pipelines # Needed changes for vcpkg -- added a pre step parameters: job_name: cargo_test # Default job name job_displayName: Cargo test # Default displayName job_dependsOn: [] # Dependencies to for the job to start job_condition: true # Job condition job_continueOnError: false # Should other job still run even if this fail job_post-steps: [] # Custom steps running after job job_pre-steps: [] # Custom steps before running job. ADDED BY ME job_strategy: # Default strategy to test on Windows, MacOs and Linux. matrix: Linux: vmImage: ubuntu-16.04 MacOS: vmImage: macOS-10.14 Windows: vmImage: vs2017-win2016 # EXTRA_TEST_FLAGS: '--features=vendored-openssl' OPENSSL_DIR: $(Build.BinariesDirectory)/OpenSSL # global parameters rust: stable # Version of rust. Could be [stable, beta, nightly, 1.31, nightly-2018-08-01 ... ] extra_test_flags: '' extra_runner_flags: '' timeout: 60 jobs: - job: ${{ parameters['job_name'] }} displayName: ${{ parameters['job_displayName'] }} condition: ${{ parameters['job_condition'] }} continueOnError: ${{ parameters['job_continueOnError'] }} dependsOn: ${{ parameters['job_dependsOn'] }} strategy: ${{ parameters['job_strategy'] }} timeoutInMinutes: ${{ parameters['timeout'] }} pool: vmImage: $(vmImage) variables: check_flags: '' steps: - template: ci/steps/install-rust.yml@rust_pipelines parameters: rust_toolchain: ${{ parameters.rust }} # Custom steps: - ${{ if parameters['job_pre-steps'] }}: - ${{ parameters['job_pre-steps'] }} # ********************************************************************************************* # parameters from libtest `cargo test -- --help` # ********************************************************************************************* - script: cargo test ${{parameters.extra_test_flags}} -- ${{parameters.extra_runner_flags}} displayName: cargo test # Custom steps: - ${{ if parameters['job_post-steps'] }}: - ${{ parameters['job_post-steps'] }}