-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
74 lines (72 loc) · 2.5 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
trigger:
branches:
include:
- master
paths:
exclude:
- README.md
- docs
- version.properties
- Cargo.toml
jobs:
- job: Linux_Build
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
set -e
mkdir -p target/x86_64-unknown-linux-musl/release/toolkit
docker build -t musl-builder -f ci/musl-builder.Dockerfile .
docker run --name musl-build musl-builder
docker cp musl-build:/home/rust/src/target/x86_64-unknown-linux-musl/release/toolkit target/x86_64-unknown-linux-musl/release/toolkit
docker rm musl-build
- task: PublishBuildArtifacts@1
displayName: "Publish Artifact: Release Build"
inputs:
PathtoPublish: ./target/x86_64-unknown-linux-musl/release/toolkit
ArtifactName: toolkit-linux
ArtifactType: Container
- job: Mac_Build
pool:
vmImage: 'macOS-10.13'
steps:
- script: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup toolchain install 1.36.0
rustup default 1.36.0
mkdir ~/bin
curl --location https://github.com/ethankhall/crom/releases/download/v0.1.14/crom-mac.tar.gz | tar -xvz -C ~/bin
chmod +x ~/bin/crom
~/bin/crom update-version --pre-release release
$HOME/.cargo/bin/cargo test
$HOME/.cargo/bin/cargo build --release
- task: PublishBuildArtifacts@1
displayName: "Publish Artifact: Release Build"
inputs:
PathtoPublish: ./target/release/toolkit
ArtifactName: toolkit-mac
ArtifactType: Container
- job: Release
pool:
vmImage: "ubuntu-16.04"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn:
- Mac_Build
- Linux_Build
steps:
- task: DownloadBuildArtifacts@0
inputs:
downloadType: specific
downloadPath: $(System.ArtifactsDirectory)/artifacts
- script: |
set -e
mkdir ~/bin || true
curl --location https://github.com/ethankhall/crom/releases/download/v0.1.14/crom-linux-musl.tar.gz | tar -xvz -C ~/bin
chmod +x ~/bin/crom
sudo apt-get install -y tree
tree $SYSTEM_ARTIFACTSDIRECTORY
git status
~/bin/crom tag-version --source local,github --ignore-changes
~/bin/crom upload-artifacts --root-artifact-path=$SYSTEM_ARTIFACTSDIRECTORY linux mac