-
Notifications
You must be signed in to change notification settings - Fork 2
/
.cirrus.yml
106 lines (103 loc) · 4.78 KB
/
.cirrus.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
task:
name: Build (Debian Linux)
container:
image: debian:10-slim
cpu: 6
environment:
AWS_ACCESS_KEY_ID: ENCRYPTED[d8943637dff8371d55ba219e4ff3a78fafebd02bb2b975e8bdf5a39609bc9e872048cdb24220a7e40f9da8aba757e787]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[ade7bd906b825fe62d4de67213dbf013073ae590a0a23ad4b362b2774a6d15c56a9bd531ad42998306e9b8ebdf02d580]
install_script:
- apt-get update && apt-get install -y --no-install-recommends git ca-certificates curl gcc libc6-dev musl-tools
- curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain nightly-2021-05-19
- 'PATH="$HOME/.cargo/bin:$PATH" rustup target add x86_64-unknown-linux-musl'
- mkdir ~/bin
- curl -L https://releases.wezm.net/upload-to-s3/0.1.10/upload-to-s3-0.1.10-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C ~/bin
test_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo test'
build_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo build --release --target x86_64-unknown-linux-musl'
publish_script: |
tag=$(git describe --exact-match HEAD 2>/dev/null || true)
if [ -n "$tag" ]; then
tarball="leaf-${tag}-x86_64-unknown-linux-musl.tar.gz"
strip target/x86_64-unknown-linux-musl/release/leaf
tar zcf "$tarball" -C target/x86_64-unknown-linux-musl/release leaf
~/bin/upload-to-s3 -b releases.wezm.net "$tarball" "leaf/$tag/$tarball"
fi
task:
name: Build (FreeBSD)
freebsd_instance:
image_family: freebsd-13-1
environment:
AWS_ACCESS_KEY_ID: ENCRYPTED[d8943637dff8371d55ba219e4ff3a78fafebd02bb2b975e8bdf5a39609bc9e872048cdb24220a7e40f9da8aba757e787]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[ade7bd906b825fe62d4de67213dbf013073ae590a0a23ad4b362b2774a6d15c56a9bd531ad42998306e9b8ebdf02d580]
install_script:
- pkg install -y git-lite
- fetch -o - https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly-2021-05-19
- fetch -o - https://releases.wezm.net/upload-to-s3/0.1.10/upload-to-s3-0.1.10-amd64-unknown-freebsd.tar.gz | tar xzf - -C /usr/local/bin
test_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo test'
build_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo build --release'
publish_script: |
tag=$(git describe --exact-match HEAD 2>/dev/null || true)
if [ -n "$tag" ]; then
tarball="leaf-${tag}-amd64-unknown-freebsd.tar.gz"
strip target/release/leaf
tar zcf "$tarball" -C target/release leaf
upload-to-s3 -b releases.wezm.net "$tarball" "leaf/$tag/$tarball"
fi
task:
name: Build (Mac OS)
osx_instance:
image: catalina-base
environment:
AWS_ACCESS_KEY_ID: ENCRYPTED[d8943637dff8371d55ba219e4ff3a78fafebd02bb2b975e8bdf5a39609bc9e872048cdb24220a7e40f9da8aba757e787]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[ade7bd906b825fe62d4de67213dbf013073ae590a0a23ad4b362b2774a6d15c56a9bd531ad42998306e9b8ebdf02d580]
install_script:
- curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain nightly-2021-05-19
- curl -L https://releases.wezm.net/upload-to-s3/0.1.10/upload-to-s3-0.1.10-x86_64-apple-darwin.tar.gz | tar xzf - -C /usr/local/bin
test_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo test'
build_script:
- 'PATH="$HOME/.cargo/bin:$PATH" cargo build --release'
publish_script: |
tag=$(git describe --exact-match HEAD 2>/dev/null || true)
if [ -n "$tag" ]; then
tarball="leaf-${tag}-x86_64-apple-darwin.tar.gz"
strip target/release/leaf
tar zcf "$tarball" -C target/release leaf
upload-to-s3 -b releases.wezm.net "$tarball" "leaf/$tag/$tarball"
fi
task:
name: Build (Windows)
windows_container:
image: cirrusci/windowsservercore:cmake
environment:
AWS_ACCESS_KEY_ID: ENCRYPTED[d8943637dff8371d55ba219e4ff3a78fafebd02bb2b975e8bdf5a39609bc9e872048cdb24220a7e40f9da8aba757e787]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[ade7bd906b825fe62d4de67213dbf013073ae590a0a23ad4b362b2774a6d15c56a9bd531ad42998306e9b8ebdf02d580]
CIRRUS_SHELL: powershell
install_script:
- Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe
- .\rustup-init -y --profile minimal
- Invoke-WebRequest https://releases.wezm.net/upload-to-s3/0.1.10/upload-to-s3-0.1.10-x86_64-pc-windows-msvc.zip -OutFile upload-to-s3.zip
- Expand-Archive upload-to-s3.zip -DestinationPath .
- git fetch --tags
test_script:
- '~\.cargo\bin\cargo test'
build_script:
- '~\.cargo\bin\cargo build --release'
publish_script: |
try {
$tag=$(git describe --exact-match HEAD 2>$null)
} catch {
$tag=""
}
if ( $tag.Length -gt 0 ) {
$tarball="leaf-$tag-x86_64-pc-windows-msvc.zip"
cd target\release
strip leaf.exe
Compress-Archive .\leaf.exe "$tarball"
cd ..\..
.\upload-to-s3 -b releases.wezm.net "target\release\$tarball" "leaf/$tag/$tarball"
}