19
19
- name : Rustfmt
20
20
run : |
21
21
cargo fmt --check
22
+ rustfmt --check build_system/mod.rs
22
23
23
24
build :
24
25
runs-on : ${{ matrix.os }}
28
29
fail-fast : false
29
30
matrix :
30
31
include :
31
- - os : ubuntu-latest
32
+ - os : ubuntu-20.04 # FIXME switch to ubuntu-22.04 once #1303 is fixed
32
33
env :
33
34
TARGET_TRIPLE : x86_64-unknown-linux-gnu
34
35
- os : macos-latest
@@ -41,28 +42,32 @@ jobs:
41
42
- os : ubuntu-latest
42
43
env :
43
44
TARGET_TRIPLE : aarch64-unknown-linux-gnu
45
+ # s390x requires QEMU 6.1 or greater, we could build it from source, but ubuntu 22.04 comes with 6.2 by default
46
+ - os : ubuntu-latest
47
+ env :
48
+ TARGET_TRIPLE : s390x-unknown-linux-gnu
44
49
45
50
steps :
46
51
- uses : actions/checkout@v3
47
52
48
53
- name : Cache cargo installed crates
49
- uses : actions/cache@v2
54
+ uses : actions/cache@v3
50
55
with :
51
56
path : ~/.cargo/bin
52
57
key : ${{ runner.os }}-cargo-installed-crates
53
58
54
59
- name : Cache cargo registry and index
55
- uses : actions/cache@v2
60
+ uses : actions/cache@v3
56
61
with :
57
62
path : |
58
63
~/.cargo/registry
59
64
~/.cargo/git
60
65
key : ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
61
66
62
67
- name : Cache cargo target dir
63
- uses : actions/cache@v2
68
+ uses : actions/cache@v3
64
69
with :
65
- path : target
70
+ path : build/cg_clif
66
71
key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
67
72
68
73
- name : Install MinGW toolchain and wine
@@ -78,11 +83,14 @@ jobs:
78
83
sudo apt-get update
79
84
sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user
80
85
81
- - name : Prepare dependencies
86
+ - name : Install s390x toolchain and qemu
87
+ if : matrix.env.TARGET_TRIPLE == 's390x-unknown-linux-gnu'
82
88
run : |
83
- git config --global user.email "user@example.com"
84
- git config --global user.name "User"
85
- ./y.rs prepare
89
+ sudo apt-get update
90
+ sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
91
+
92
+ - name : Prepare dependencies
93
+ run : ./y.rs prepare
86
94
87
95
- name : Build without unstable features
88
96
env :
@@ -110,7 +118,7 @@ jobs:
110
118
./y.rs test
111
119
112
120
- name : Package prebuilt cg_clif
113
- run : tar cvfJ cg_clif.tar.xz build
121
+ run : tar cvfJ cg_clif.tar.xz dist
114
122
115
123
- name : Upload prebuilt cg_clif
116
124
if : matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
@@ -121,7 +129,7 @@ jobs:
121
129
122
130
- name : Upload prebuilt cg_clif (cross compile)
123
131
if : matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
124
- uses : actions/upload-artifact@v2
132
+ uses : actions/upload-artifact@v3
125
133
with :
126
134
name : cg_clif-${{ runner.os }}-cross-x86_64-mingw
127
135
path : cg_clif.tar.xz
@@ -147,23 +155,23 @@ jobs:
147
155
- uses : actions/checkout@v3
148
156
149
157
- name : Cache cargo installed crates
150
- uses : actions/cache@v2
158
+ uses : actions/cache@v3
151
159
with :
152
160
path : ~/.cargo/bin
153
161
key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-installed-crates
154
162
155
163
- name : Cache cargo registry and index
156
- uses : actions/cache@v2
164
+ uses : actions/cache@v3
157
165
with :
158
166
path : |
159
167
~/.cargo/registry
160
168
~/.cargo/git
161
169
key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
162
170
163
171
- name : Cache cargo target dir
164
- uses : actions/cache@v2
172
+ uses : actions/cache@v3
165
173
with :
166
- path : target
174
+ path : build/cg_clif
167
175
key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
168
176
169
177
- name : Set MinGW as the default toolchain
@@ -172,8 +180,6 @@ jobs:
172
180
173
181
- name : Prepare dependencies
174
182
run : |
175
- git config --global user.email "user@example.com"
176
- git config --global user.name "User"
177
183
git config --global core.autocrlf false
178
184
rustc y.rs -o y.exe -g
179
185
./y.exe prepare
@@ -198,24 +204,24 @@ jobs:
198
204
199
205
# Enable extra checks
200
206
$Env:CG_CLIF_ENABLE_VERIFIER=1
201
-
207
+
202
208
# WIP Disable some tests
203
-
209
+
204
210
# This fails due to some weird argument handling by hyperfine, not an actual regression
205
211
# more of a build system issue
206
212
(Get-Content config.txt) -replace '(bench.simple-raytracer)', '# $1' | Out-File config.txt
207
-
208
- # This fails with a different output than expected
213
+
214
+ # This fails with a different output than expected
209
215
(Get-Content config.txt) -replace '(test.regex-shootout-regex-dna)', '# $1' | Out-File config.txt
210
216
211
217
./y.exe test
212
218
213
219
- name : Package prebuilt cg_clif
214
220
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
215
- run : tar cvf cg_clif.tar build
221
+ run : tar cvf cg_clif.tar dist
216
222
217
223
- name : Upload prebuilt cg_clif
218
- uses : actions/upload-artifact@v2
224
+ uses : actions/upload-artifact@v3
219
225
with :
220
226
name : cg_clif-${{ matrix.env.TARGET_TRIPLE }}
221
227
path : cg_clif.tar
0 commit comments