# Starter pipeline # Start with a minimal pipeline that you can customize to build and deploy your code. # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml trigger: branches: include: ['*'] tags: include: ['*'] strategy: matrix: windows-stable: imageName: 'vs2017-win2016' rustup_toolchain: stable target: 'Windows' mac-stable: imageName: 'macos-10.14' rustup_toolchain: stable target: 'Darwin' linux-stable: imageName: 'ubuntu-16.04' rustup_toolchain: stable target: 'Linux' pool: vmImage: $(imageName) steps: - 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 condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | rustup install stable --no-self-update displayName: Windows install rust condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: cargo build --all displayName: Build debug binary - script: cargo test --all displayName: Run tests - script: cargo build --all --release condition: and(and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')), not( eq( variables['Agent.OS'], 'Windows_NT' ) )) displayName: Build release binary - bash: | MY_TAG="$(Build.SourceBranch)" MY_TAG=${MY_TAG#refs/tags/} echo $MY_TAG echo "##vso[task.setvariable variable=build.my_tag]$MY_TAG" displayName: "Create tag variable" - task: GithubRelease@0 condition: and(and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')), not( eq( variables['Agent.OS'], 'Windows_NT' ) )) displayName: 'Create Github release' inputs: githubConnection: afnanenayetgh repositoryName: afnanenayet/hashed-permutation action: 'create' tagSource: auto compareWith: 'lastFullRelease' addChangeLog: true