Skip to content

Commit 143d5b4

Browse files
authored
Merge pull request #854 from rust-ndarray/gh-action-cross
Add cross testing of 32-bit architectures in CI
2 parents 5fe0600 + ddfc6fd commit 143d5b4

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,33 @@ jobs:
3333
run: sudo apt-get install libopenblas-dev gfortran
3434
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
3535

36+
cross_test:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
include:
41+
- rust: stable
42+
target: mips-unknown-linux-gnu
43+
- rust: stable
44+
target: i686-unknown-linux-gnu
45+
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions-rs/toolchain@v1
49+
with:
50+
profile: minimal
51+
toolchain: ${{ matrix.rust }}
52+
taret: ${{ matrix.target }}
53+
override: true
54+
- name: Cache cargo plugins
55+
uses: actions/cache@v1
56+
with:
57+
path: ~/.cargo/bin/
58+
key: ${{ runner.os }}-cargo-plugins
59+
- name: Install cross
60+
run: cargo install cross || true
61+
- run: ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}
62+
3663
clippy:
3764
runs-on: ubuntu-latest
3865
strategy:

scripts/cross-tests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
set -x
4+
set -e
5+
6+
FEATURES=$1
7+
CHANNEL=$2
8+
TARGET=$3
9+
10+
cross build -v --features="$FEATURES" --target=$TARGET
11+
cross test -v --no-fail-fast --features="$FEATURES" --target=$TARGET
12+
cross test -v --no-fail-fast --target=$TARGET --manifest-path=ndarray-rand/Cargo.toml --features quickcheck
13+
cross test -v --no-fail-fast --target=$TARGET --manifest-path=serialization-tests/Cargo.toml --verbose
14+
CARGO_TARGET_DIR=target/ cross test -v --no-fail-fast --target=$TARGET --manifest-path=numeric-tests/Cargo.toml

0 commit comments

Comments
 (0)