# see https://nbsoftsolutions.com/blog/azure-pipelines-for-rust-projects strategy: matrix: windows-latest: imageName: 'windows-latest' rustup_toolchain: stable mac-latest: imageName: 'macOS-latest' rustup_toolchain: stable linux-latest: imageName: 'ubuntu-latest' rustup_toolchain: stable pool: vmImage: $(imageName) steps: - template: '_build/install-rust.yml' - script: | set OPENSSL_DIR=D:\a\1\s\vcpkg\packages\openssl-windows_x64-windows cargo build --release --features cli displayName: Cargo build windows condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | cargo build --release --features cli displayName: Cargo build mac/linux condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | set OPENSSL_DIR=D:\a\1\s\vcpkg\packages\openssl-windows_x64-windows cargo test --release displayName: Cargo test windows condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: cargo test --release displayName: Cargo test mac/linux condition: ne( variables['Agent.OS'], 'Windows_NT' ) - task: ArchiveFiles@2 displayName: 'Archive build to zip' inputs: rootFolderOrFile: '$(System.DefaultWorkingDirectory)/target' includeRootFolder: false archiveType: zip archiveFile: '$(Build.ArtifactStagingDirectory)/VADE_$(Build.SourceVersion)_$(Agent.OS).zip' replaceExistingArchive: true - upload: $(Build.ArtifactStagingDirectory)/VADE_$(Build.SourceVersion)_$(Agent.OS).zip artifact: VADE_$(Build.SourceVersion)_$(Agent.OS)_$(system.JobId)