trigger: branches: include: ['*'] tags: include: ['*'] resources: repositories: - repository: templates type: github name: xoac/rust-azure-pipelines ref: refs/heads/master ## TODO you may want to change it to refs/tags/TAG_NAME. endpoint: githubConnection jobs: # Check formatting - template: ci/rustfmt.yml@templates parameters: name: rustfmt displayName: Check formatting # This represents the minimum Rust version supported. # Tests are not run as tests may require newer versions of rust. - template: ci/cargo-check.yml@templates parameters: name: minrust rust_version: 1.31.0 # The 2018 edition displayName: Check rust min ver ################ # Test stage # ############### # Test stable - template: ci/test.yml@templates parameters: name: cargo_test_stable displayName: Cargo test cross: true # Test on Windows and macOS # Test nightly - template: ci/test.yml@templates parameters: name: cargo_test_nightly displayName: Cargo test rust_version: nightly # Test cross # List of supported targets is available here: https://github.com/rust-embedded/cross#supported-targets - template: ci/cargo-cross.yml@templates parameters: name: cargo_cross displayName: Cross check and test rust_version: stable # You can specify here beta nightly or even 1.31 test_targets: - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl - x86_64-pc-windows-gnu ################### # DEPLOY PART # ################### # TODO you need to modify git parameters and specify variable in pipeline. See [README.md](https://github.com/xoac/rust-azure-pipelines/blob/master/README.md) # Release binary - template: ci/github-release.yml@templates parameters: name: github_release dependsOn: - minrust - rustfmt - cargo_test_stable - cargo_cross rust_version: stable condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) contents: | * !*.rlib !*.d !.* targets: - x86_64-unknown-linux-gnu - x86_64-pc-windows-gnu - x86_64-pc-windows-msvc - x86_64-apple-darwin github: gitHubConnection: githubConnection repositoryName: chmln/sd isPreRelease: true