Skip to content

Commit 36c8bf3

Browse files
committed
Improve cross tests
1 parent 8c89a72 commit 36c8bf3

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,15 @@ jobs:
167167
RUSTFLAGS: ${{ matrix.rustflags }}
168168

169169
cross-tests:
170-
name: "${{ matrix.target }} (via cross)"
170+
name: "${{ matrix.target_feature }} on ${{ matrix.target }} (via cross)"
171171
runs-on: ubuntu-latest
172172
strategy:
173173
fail-fast: false
174174

175175
matrix:
176176
target:
177177
- armv7-unknown-linux-gnueabihf
178+
- thumbv7neon-unknown-linux-gnueabihf
178179
- aarch64-unknown-linux-gnu
179180
- powerpc-unknown-linux-gnu
180181
- powerpc64-unknown-linux-gnu
@@ -183,7 +184,11 @@ jobs:
183184
# MIPS uses a nonstandard binary representation for NaNs which makes it worth testing
184185
# - mips-unknown-linux-gnu
185186
# - mips64-unknown-linux-gnuabi64
186-
target_feature: ["", "+native"]
187+
target_feature: "default"
188+
include:
189+
- { target: powerpc64-unknown-linux-gnu, target_feature: "native" }
190+
- { target: powerpc64le-unknown-linux-gnu, target_feature: "native" }
191+
- { target: riscv64gc-unknown-linux-gnu, target_feature: "native" }
187192

188193
steps:
189194
- uses: actions/checkout@v2
@@ -206,7 +211,18 @@ jobs:
206211
echo "$HOME/.bin" >> $GITHUB_PATH
207212
208213
- name: Configure RUSTFLAGS
209-
run: echo "-Ctarget-feature=${{ matrix.target_feature }}" >> $GITHUB_ENV
214+
shell: bash
215+
run: |
216+
case "${{ matrix.target_feature }}" in
217+
default)
218+
echo "RUSTFLAGS=" >> $GITHUB_ENV;;
219+
native)
220+
echo "RUSTFLAGS=-Ctarget-cpu=native" >> $GITHUB_ENV
221+
;;
222+
*)
223+
echo "RUSTFLAGS=-Ctarget-feature=${{ matrix.target_feature }}" >> $GITHUB_ENV
224+
;;
225+
esac
210226
211227
- name: Test (debug)
212228
run: cross test --verbose --target=${{ matrix.target }}

0 commit comments

Comments
 (0)