1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-24 07:46:59 +03:00
wezterm/azure-pipelines.yml

168 lines
5.7 KiB
YAML
Raw Normal View History

2019-06-23 16:47:35 +03:00
trigger:
branches:
2019-06-23 17:12:12 +03:00
include: ['master']
2019-06-23 16:47:35 +03:00
tags:
include: ['*']
2019-06-23 16:47:35 +03:00
jobs:
- job: 'Clippy'
pool:
vmImage: 'ubuntu-16.04'
steps:
2019-06-23 17:01:26 +03:00
- checkout: self
submodules: true
2019-06-23 17:33:43 +03:00
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$HOME/.cargo/bin:$PATH"
displayName: Install rust
- script: |
rustup update
displayName: Update rust toolchains
2019-06-23 16:47:35 +03:00
- script: rustup component add clippy
displayName: Install clippy
2019-06-23 17:01:26 +03:00
- script: |
sudo ./get-deps
displayName: Install system dependencies
2019-06-23 16:47:35 +03:00
- script: cargo clippy --all
displayName: Run Clippy
2019-06-23 16:47:35 +03:00
- job: 'Rustfmt'
pool:
vmImage: 'ubuntu-16.04'
steps:
2019-06-23 17:33:43 +03:00
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$HOME/.cargo/bin:$PATH"
displayName: Install rust
- script: |
rustup update
displayName: Update rust toolchains
2019-06-23 16:47:35 +03:00
- script: rustup component add rustfmt
displayName: Install Rustfmt
- script: cargo fmt --all -- --check
displayName: Check formatting
- job: 'Test'
# A list of vmImage names can be found at:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent
strategy:
matrix:
windows-stable:
imageName: 'vs2017-win2016'
rustup_toolchain: stable
mac-stable:
imageName: 'macos-10.14'
rustup_toolchain: stable
linux-stable:
imageName: 'ubuntu-16.04'
rustup_toolchain: stable
linux-beta:
imageName: 'ubuntu-16.04'
rustup_toolchain: beta
linux-nightly:
imageName: 'ubuntu-16.04'
rustup_toolchain: nightly
pool:
vmImage: $(imageName)
steps:
- checkout: self
submodules: true
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$HOME/.cargo/bin:$PATH"
2019-06-23 17:33:43 +03:00
displayName: Install rust (posix)
2019-06-23 16:47:35 +03:00
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -yv --default-toolchain %RUSTUP_TOOLCHAIN%
echo "##vso[task.setvariable variable=PATH;]%USERPROFILE%\.cargo\bin;%PATH%"
2019-06-23 17:33:43 +03:00
displayName: Install rust (windows)
2019-06-23 16:47:35 +03:00
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustup update
displayName: Update rust toolchains
- script: |
rustc -vV
cargo -vV
displayName: Show installed rust+cargo version
- script: |
sudo ./get-deps
displayName: Install system dependencies
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: cargo build --all
displayName: Cargo build
- script: cargo test --all
displayName: Cargo test
- job: 'Package'
strategy:
matrix:
windows-stable:
imageName: 'vs2017-win2016'
rustup_toolchain: stable
mac-stable:
imageName: 'macos-10.14'
rustup_toolchain: stable
linux-stable:
imageName: 'ubuntu-16.04'
rustup_toolchain: stable
pool:
vmImage: $(imageName)
steps:
- checkout: self
submodules: true
2019-06-23 17:33:43 +03:00
- script: |
DATE="$(date +%Y%m%d-%H%M%S)"
echo "##vso[task.setvariable variable=build.date]$DATE"
displayName: "Create date variable"
- script: |
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 my tag variable"
2019-06-23 16:47:35 +03:00
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$HOME/.cargo/bin:$PATH"
2019-06-23 17:01:26 +03:00
displayName: Install rust (posix)
2019-06-23 16:47:35 +03:00
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -yv --default-toolchain %RUSTUP_TOOLCHAIN%
echo "##vso[task.setvariable variable=PATH;]%USERPROFILE%\.cargo\bin;%PATH%"
2019-06-23 17:01:26 +03:00
displayName: install rust (windows)
2019-06-23 16:47:35 +03:00
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustup update
displayName: Update rust toolchains
- script: |
rustc -vV
cargo -vV
displayName: Show installed rust+cargo version
- script: |
sudo ./get-deps
displayName: Install system dependencies
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: cargo build --release --all
2019-06-23 17:01:26 +03:00
displayName: Build in release mode
2019-06-23 17:33:43 +03:00
- script: bash ci/deploy.sh
2019-06-23 16:47:35 +03:00
displayName: Packaging
2019-06-23 17:33:43 +03:00
- task: GithubRelease@0
condition: succeeded()
#condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
inputs:
gitHubConnection: 'wez'
repositoryName: 'wez/wezterm'
action: 'edit'
target: '$(build.sourceVersion)'
tagSource: 'manual'
tag: 'azure-test-$(build.my_tag)'
2019-06-23 17:36:46 +03:00
assets: |
$(Build.SourcesDirectory)/*.zip
$(Build.SourcesDirectory)/*.deb
2019-06-23 17:33:43 +03:00
title: 'Azure test: $(build.my_tag) - $(build.date)'
assetUploadMode: 'replace'
addChangeLog: false
isPreRelease: true
isDraft: true