|
19 | 19 | - name: Rustfmt
|
20 | 20 | run: |
|
21 | 21 | cargo fmt --check
|
22 |
| - rustfmt --check build_system/mod.rs |
| 22 | + rustfmt --check build_system/main.rs |
23 | 23 | rustfmt --check example/*
|
24 | 24 |
|
25 | 25 |
|
@@ -91,22 +91,52 @@ jobs:
|
91 | 91 | sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
|
92 | 92 |
|
93 | 93 | - name: Prepare dependencies
|
94 |
| - run: ./y.rs prepare |
| 94 | + run: ./y.sh prepare |
| 95 | + |
| 96 | + - name: Build |
| 97 | + run: ./y.sh build --sysroot none |
95 | 98 |
|
96 |
| - - name: Build without unstable features |
| 99 | + - name: Test |
97 | 100 | env:
|
98 | 101 | TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
|
99 |
| - # This is the config rust-lang/rust uses for builds |
100 |
| - run: ./y.rs build --no-unstable-features |
| 102 | + run: ./y.sh test |
101 | 103 |
|
102 |
| - - name: Build |
103 |
| - run: ./y.rs build --sysroot none |
| 104 | + - name: Install LLVM standard library |
| 105 | + run: rustup target add ${{ matrix.env.TARGET_TRIPLE }} |
104 | 106 |
|
105 |
| - - name: Test |
| 107 | + # This is roughly config rust-lang/rust uses for testing |
| 108 | + - name: Test with LLVM sysroot |
| 109 | + # Skip native x86_64-pc-windows-gnu. It is way too slow and cross-compiled |
| 110 | + # x86_64-pc-windows-gnu covers at least part of the tests. |
| 111 | + if: matrix.os != 'windows-latest' || matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu' |
106 | 112 | env:
|
107 | 113 | TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
|
108 |
| - run: ./y.rs test |
| 114 | + run: ./y.sh test --sysroot llvm --no-unstable-features |
| 115 | + |
| 116 | + |
| 117 | + # This job doesn't use cg_clif in any way. It checks that all cg_clif tests work with cg_llvm too. |
| 118 | + test_llvm: |
| 119 | + runs-on: ubuntu-latest |
| 120 | + timeout-minutes: 60 |
| 121 | + |
| 122 | + defaults: |
| 123 | + run: |
| 124 | + shell: bash |
109 | 125 |
|
| 126 | + steps: |
| 127 | + - uses: actions/checkout@v3 |
| 128 | + |
| 129 | + - name: Prepare dependencies |
| 130 | + run: ./y.rs prepare |
| 131 | + |
| 132 | + - name: Disable JIT tests |
| 133 | + run: | |
| 134 | + sed -i 's/jit./#jit./' config.txt |
| 135 | +
|
| 136 | + - name: Test |
| 137 | + env: |
| 138 | + TARGET_TRIPLE: x86_64-unknown-linux-gnu |
| 139 | + run: ./y.rs test --use-backend llvm |
110 | 140 |
|
111 | 141 | bench:
|
112 | 142 | runs-on: ubuntu-latest
|
@@ -135,13 +165,13 @@ jobs:
|
135 | 165 | run: cargo install hyperfine || true
|
136 | 166 |
|
137 | 167 | - name: Prepare dependencies
|
138 |
| - run: ./y.rs prepare |
| 168 | + run: ./y.sh prepare |
139 | 169 |
|
140 | 170 | - name: Build
|
141 |
| - run: CI_OPT=1 ./y.rs build --sysroot none |
| 171 | + run: CI_OPT=1 ./y.sh build --sysroot none |
142 | 172 |
|
143 | 173 | - name: Benchmark
|
144 |
| - run: CI_OPT=1 ./y.rs bench |
| 174 | + run: CI_OPT=1 ./y.sh bench |
145 | 175 |
|
146 | 176 |
|
147 | 177 | dist:
|
@@ -194,13 +224,13 @@ jobs:
|
194 | 224 | sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
|
195 | 225 |
|
196 | 226 | - name: Prepare dependencies
|
197 |
| - run: ./y.rs prepare |
| 227 | + run: ./y.sh prepare |
198 | 228 |
|
199 | 229 | - name: Build backend
|
200 |
| - run: CI_OPT=1 ./y.rs build --sysroot none |
| 230 | + run: CI_OPT=1 ./y.sh build --sysroot none |
201 | 231 |
|
202 | 232 | - name: Build sysroot
|
203 |
| - run: CI_OPT=1 ./y.rs build |
| 233 | + run: CI_OPT=1 ./y.sh build |
204 | 234 |
|
205 | 235 | - name: Package prebuilt cg_clif
|
206 | 236 | run: tar cvfJ cg_clif.tar.xz dist
|
|
0 commit comments