This repository has been archived by the owner on Mar 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
71 lines (69 loc) · 2.4 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
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/inv
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/inc target/x86_64-unknown-linux-musl/release/inc
docker rm musl-build
- task: PublishBuildArtifacts@1
displayName: "Publish Artifact: Release Build"
inputs:
PathtoPublish: ./target/x86_64-unknown-linux-musl/release/inc
ArtifactName: inc-linux
ArtifactType: Container
- job: Mac_Build
pool:
vmImage: 'macOS-10.13'
steps:
- script: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y
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/inc
ArtifactName: inc-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