Skip to content

Commit e76bc14

Browse files
committed
Add cross test (inspired by ndarray CI)
1 parent b802b53 commit e76bc14

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
- name: Install toolchain
6363
uses: actions-rs/toolchain@v1
6464
with:
65+
profile: minimal
6566
target: ${{ matrix.target }}
6667
toolchain: ${{ matrix.toolchain }}
6768
override: true
@@ -97,6 +98,43 @@ jobs:
9798
- name: Test rand_hc
9899
run: cargo test --target ${{ matrix.target }} --manifest-path rand_hc/Cargo.toml
99100

101+
test-cross:
102+
runs-on: ${{ matrix.os }}
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
include:
107+
- os: ubuntu-latest
108+
target: mips-unknown-linux-gnu
109+
toolchain: stable
110+
111+
steps:
112+
- uses: actions/checkout@v2
113+
- name: Install toolchain
114+
uses: actions-rs/toolchain@v1
115+
with:
116+
profile: minimal
117+
target: ${{ matrix.target }}
118+
toolchain: ${{ matrix.toolchain }}
119+
override: true
120+
- name: Cache cargo plugins
121+
uses: actions/cache@v1
122+
with:
123+
path: ~/.cargo/bin/
124+
key: ${{ runner.os }}-cargo-plugins
125+
- name: Install cross
126+
run: cargo install cross || true
127+
- name: Test
128+
run: |
129+
# all stable features:
130+
cross test -v --no-fail-fast --target ${{ matrix.target }} --features=serde1,log,small_rng
131+
cross test -v --no-fail-fast --target ${{ matrix.target }} --examples
132+
cross test -v --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
133+
cross test -v --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml
134+
cross test -v --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde1
135+
cross test -v --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml
136+
cross test -v --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_hc/Cargo.toml
137+
100138
test-miri:
101139
runs-on: ubuntu-latest
102140
steps:
@@ -125,6 +163,7 @@ jobs:
125163
- name: Install toolchain
126164
uses: actions-rs/toolchain@v1
127165
with:
166+
profile: minimal
128167
toolchain: nightly
129168
target: thumbv6m-none-eabi
130169
override: true
@@ -138,6 +177,7 @@ jobs:
138177
- name: Install toolchain
139178
uses: actions-rs/toolchain@v1
140179
with:
180+
profile: minimal
141181
toolchain: nightly
142182
target: aarch64-apple-ios
143183
override: true

0 commit comments

Comments
 (0)