1919 - name : Rustfmt
2020 run : |
2121 cargo fmt --check
22+ rustfmt --check build_system/mod.rs
2223
2324 build :
2425 runs-on : ${{ matrix.os }}
2829 fail-fast : false
2930 matrix :
3031 include :
31- - os : ubuntu-latest
32+ - os : ubuntu-20.04 # FIXME switch to ubuntu-22.04 once #1303 is fixed
3233 env :
3334 TARGET_TRIPLE : x86_64-unknown-linux-gnu
3435 - os : macos-latest
@@ -41,28 +42,32 @@ jobs:
4142 - os : ubuntu-latest
4243 env :
4344 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
4449
4550 steps :
4651 - uses : actions/checkout@v3
4752
4853 - name : Cache cargo installed crates
49- uses : actions/cache@v2
54+ uses : actions/cache@v3
5055 with :
5156 path : ~/.cargo/bin
5257 key : ${{ runner.os }}-cargo-installed-crates
5358
5459 - name : Cache cargo registry and index
55- uses : actions/cache@v2
60+ uses : actions/cache@v3
5661 with :
5762 path : |
5863 ~/.cargo/registry
5964 ~/.cargo/git
6065 key : ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
6166
6267 - name : Cache cargo target dir
63- uses : actions/cache@v2
68+ uses : actions/cache@v3
6469 with :
65- path : target
70+ path : build/cg_clif
6671 key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
6772
6873 - name : Install MinGW toolchain and wine
@@ -78,11 +83,14 @@ jobs:
7883 sudo apt-get update
7984 sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user
8085
81- - name : Prepare dependencies
86+ - name : Install s390x toolchain and qemu
87+ if : matrix.env.TARGET_TRIPLE == 's390x-unknown-linux-gnu'
8288 run : |
83- git config --global user.email "[email protected] " 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
8694
8795 - name : Build without unstable features
8896 env :
@@ -110,7 +118,7 @@ jobs:
110118 ./y.rs test
111119
112120 - name : Package prebuilt cg_clif
113- run : tar cvfJ cg_clif.tar.xz build
121+ run : tar cvfJ cg_clif.tar.xz dist
114122
115123 - name : Upload prebuilt cg_clif
116124 if : matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
@@ -121,7 +129,7 @@ jobs:
121129
122130 - name : Upload prebuilt cg_clif (cross compile)
123131 if : matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
124- uses : actions/upload-artifact@v2
132+ uses : actions/upload-artifact@v3
125133 with :
126134 name : cg_clif-${{ runner.os }}-cross-x86_64-mingw
127135 path : cg_clif.tar.xz
@@ -147,23 +155,23 @@ jobs:
147155 - uses : actions/checkout@v3
148156
149157 - name : Cache cargo installed crates
150- uses : actions/cache@v2
158+ uses : actions/cache@v3
151159 with :
152160 path : ~/.cargo/bin
153161 key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-installed-crates
154162
155163 - name : Cache cargo registry and index
156- uses : actions/cache@v2
164+ uses : actions/cache@v3
157165 with :
158166 path : |
159167 ~/.cargo/registry
160168 ~/.cargo/git
161169 key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
162170
163171 - name : Cache cargo target dir
164- uses : actions/cache@v2
172+ uses : actions/cache@v3
165173 with :
166- path : target
174+ path : build/cg_clif
167175 key : ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
168176
169177 - name : Set MinGW as the default toolchain
@@ -172,8 +180,6 @@ jobs:
172180
173181 - name : Prepare dependencies
174182 run : |
175- git config --global user.email "[email protected] " 176- git config --global user.name "User"
177183 git config --global core.autocrlf false
178184 rustc y.rs -o y.exe -g
179185 ./y.exe prepare
@@ -198,24 +204,24 @@ jobs:
198204
199205 # Enable extra checks
200206 $Env:CG_CLIF_ENABLE_VERIFIER=1
201-
207+
202208 # WIP Disable some tests
203-
209+
204210 # This fails due to some weird argument handling by hyperfine, not an actual regression
205211 # more of a build system issue
206212 (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
209215 (Get-Content config.txt) -replace '(test.regex-shootout-regex-dna)', '# $1' | Out-File config.txt
210216
211217 ./y.exe test
212218
213219 - name : Package prebuilt cg_clif
214220 # 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
216222
217223 - name : Upload prebuilt cg_clif
218- uses : actions/upload-artifact@v2
224+ uses : actions/upload-artifact@v3
219225 with :
220226 name : cg_clif-${{ matrix.env.TARGET_TRIPLE }}
221227 path : cg_clif.tar
0 commit comments