Skip to content

Commit 740af8d

Browse files
committed
big endian tests on CI
1 parent abb3a54 commit 740af8d

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,68 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
rust: [stable, beta, nightly, 1.62.0] # MSRV=1.62
16+
rust: [stable, beta, nightly, 1.62.0] # MSRV=1.62
1717
steps:
1818
- uses: actions/checkout@v2
19-
with: {submodules: true}
19+
with: { submodules: true }
2020
- uses: actions-rs/toolchain@v1
21-
with: {profile: minimal, toolchain: '${{ matrix.rust }}', override: true}
21+
with:
22+
{ profile: minimal, toolchain: "${{ matrix.rust }}", override: true }
2223
- run: cargo test
24+
tests-s390x:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
features: [default, reference]
29+
steps:
30+
- uses: actions/checkout@v2
31+
with: { submodules: true }
32+
- uses: actions-rs/toolchain@v1
33+
with:
34+
profile: minimal
35+
toolchain: nightly
36+
override: true
37+
target: s390x-unknown-linux-gnu
38+
components: rust-src
39+
- run: sudo apt-get update && sudo apt-get install -y qemu-user-static gcc-s390x-linux-gnu
40+
- run: |
41+
if [ "${{ matrix.features }}" = "reference" ]; then
42+
echo "FEATURES=alloc,reference" >> $GITHUB_ENV
43+
else
44+
echo "FEATURES=alloc" >> $GITHUB_ENV
45+
fi
46+
- run: |
47+
cargo build \
48+
--target s390x-unknown-linux-gnu \
49+
--tests \
50+
-Zbuild-std \
51+
--no-default-features \
52+
--features=${FEATURES}
53+
env:
54+
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER: "s390x-linux-gnu-gcc"
55+
RUSTFLAGS: "-D warnings -C target-feature=+crt-static"
56+
# - run: qemu-s390x-static ./target/s390x-unknown-linux-gnu/debug/deps/*test*
57+
- run: |
58+
for test in ./target/s390x-unknown-linux-gnu/debug/deps/*test*; do
59+
echo "Running $test"
60+
qemu-s390x-static -strace $test || echo "Failed: $test"
61+
done
2362
reference:
2463
runs-on: ubuntu-latest
2564
steps:
2665
- uses: actions/checkout@v2
27-
with: {submodules: true}
66+
with: { submodules: true }
2867
- uses: actions-rs/toolchain@v1
29-
with: {profile: minimal, toolchain: stable, override: true}
68+
with: { profile: minimal, toolchain: stable, override: true }
3069
- run: cargo test --features=reference
3170
clippy:
3271
runs-on: ubuntu-latest
3372
steps:
3473
- uses: actions/checkout@v2
3574
- uses: actions-rs/toolchain@v1
36-
with: {profile: minimal, toolchain: beta, override: true, components: clippy}
75+
with:
76+
profile: minimal
77+
toolchain: beta
78+
override: true
79+
components: clippy
3780
- run: cargo clippy

0 commit comments

Comments
 (0)