-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.cirrus.yml
164 lines (159 loc) · 5.12 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
env:
GITHUB_TOKEN: ENCRYPTED[1c2ef2877c7f171e40a831f61367e810b57010d6b2eded04f68177e3ec096c3c85619be02f3f0c081fd1eb9b64dd15bb]
macos_universal_task:
macos_instance:
image: big-sur-xcode
env:
RUST_HOME: $HOME/macos
CARGO_HOME: $RUST_HOME/cargo
RUSTUP_HOME: $RUST_HOME/rustup
PATH: $CARGO_HOME/bin:$PATH
rust_cache:
folder: $RUST_HOME
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- date +%Y
populate_script: >
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |
sh -s -- -y --verbose --no-modify-path --target aarch64-apple-darwin
update_script: rustup --verbose update
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- rustc --version
build_script:
- cargo build --verbose --release --target aarch64-apple-darwin
- mv target/aarch64-apple-darwin/release/yj yj.macos.aarch64
- cargo build --verbose --release --target x86_64-apple-darwin
- mv target/x86_64-apple-darwin/release/yj yj.macos.x86_64
- lipo -create -output yj.macos.universal yj.macos.aarch64 yj.macos.x86_64
- file yj.macos.universal
binary_artifacts:
path: yj.macos.*
release_script: ./upload-binary.sh yj.macos.*
before_cache_script: rm -f target/.rustc_info.json
linux_x68_64_task:
container:
image: rust:alpine
registry_cache:
folder: $CARGO_HOME/registry
reupload_on_changes: true
fingerprint_script: date +%Y
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- rustc --version
setup_script:
- apk add --no-cache curl libc-dev
build_script:
- cargo build --verbose --release
- mv target/release/yj yj.$CIRRUS_OS.x86_64
- ldd yj.$CIRRUS_OS.x86_64 || echo yay - statically linked
binary_artifacts:
path: yj.$CIRRUS_OS.*
release_script: ./upload-binary.sh yj.$CIRRUS_OS.*
before_cache_script: rm -f target/.rustc_info.json
linux_arm_task:
arm_container:
image: rust:alpine
registry_cache:
folder: $CARGO_HOME/registry
reupload_on_changes: true
fingerprint_script: date +%Y
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- rustc --version
setup_script:
- apk add --no-cache curl libc-dev
build_script:
- cargo build --verbose --release
- mv target/release/yj yj.$CIRRUS_OS.aarch64
- ldd yj.$CIRRUS_OS.aarch64 || echo yay - statically linked
binary_artifacts:
path: yj.$CIRRUS_OS.*
release_script: ./upload-binary.sh yj.$CIRRUS_OS.*
before_cache_script: rm -f target/.rustc_info.json
freebsd_x86_task:
freebsd_instance:
image_family: freebsd-13-0
env:
RUST_HOME: $HOME/freebsd
CARGO_HOME: $RUST_HOME/cargo
RUSTUP_HOME: $RUST_HOME/rustup
PATH: $CARGO_HOME/bin:$PATH
rust_cache:
folder: $RUST_HOME
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- date +%Y
populate_script: >
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |
sh -s -- -y --verbose --no-modify-path
update_script: rustup --verbose update
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo $CIRRUS_OS
- rustc --version
build_script:
- cargo build --verbose --release
- mv target/release/yj yj.$CIRRUS_OS.x86_64
- file yj.$CIRRUS_OS.x86_64
binary_artifacts:
path: yj.$CIRRUS_OS.*
release_script: ./upload-binary.sh yj.$CIRRUS_OS.*
before_cache_script: rm -f target/.rustc_info.json
windows_x86_task:
windows_container:
image: cirrusci/windowsservercore:2019
env:
RUST_HOME: C:\Users\ContainerAdministrator\rust
CARGO_HOME: $RUST_HOME\cargo
RUSTUP_HOME: $RUST_HOME\rustup
PATH: $CARGO_HOME\bin;$PATH
vs_cpp_script:
- curl -fSLo vs_buildtools.exe https://aka.ms/vs/16/release/vs_buildtools.exe
- >
vs_buildtools.exe --quiet --wait --norestart --nocache
--installPath C:\BuildTools
--add Microsoft.Component.MSBuild
--add Microsoft.VisualStudio.Component.Windows10SDK.18362
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64
rust_cache:
folder: $RUST_HOME
reupload_on_changes: true
fingerprint_script:
- echo %CIRRUS_OS%
- echo plusarm
- date /t
populate_script:
- curl -fSLo rustup-init.exe https://win.rustup.rs/x86_64
- rustup-init.exe -y --verbose --target aarch64-pc-windows-msvc
- del rustup-init.exe
update_script:
- rustup --verbose update
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo %CIRRUS_OS%
- rustc --version
build_script:
- cargo build --verbose --release --target aarch64-pc-windows-msvc
- move target\aarch64-pc-windows-msvc\release\yj.exe yj.%CIRRUS_OS%.aarch64.exe
- cargo build --verbose --release --target x86_64-pc-windows-msvc
- move target\x86_64-pc-windows-msvc\release\yj.exe yj.%CIRRUS_OS%.x86_64.exe
binary_artifacts:
path: yj.%CIRRUS_OS%.*
before_cache_script: del target\.rustc_info.json