Skip to content

Commit

Permalink
GHA: Run tests on multiple platforms (#275)
Browse files Browse the repository at this point in the history
* GHA: run tests on ubuntu-, windows- and macos- latest

* GHA: merge clippy CI pipelines

* only run windows tests using virtual memory single threaded

* GHA: clean-up a bit

* GHA: rename RUSTC_FLAGS to TEST_FLAGS

* GHA: rename rustc-args to test-args
  • Loading branch information
Robbepop authored Dec 9, 2021
1 parent 4e2c57d commit 060c503
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
# Include a new variable `rustc-args` with `-- --test-threads 1`
# for windows-latest to be used with virtual_memory crate feature
# enabled while testing.
- os: windows-latest
test-args: "--test-threads 1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -58,9 +67,10 @@ jobs:
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '--cfg debug_assertions'
TEST_FLAGS: ${{ matrix.test-args }}
with:
command: test
args: --release --features virtual_memory
args: --release --features virtual_memory -- $TEST_FLAGS

fmt:
name: Formatting
Expand Down Expand Up @@ -97,18 +107,6 @@ jobs:
with:
command: clippy
args: --features virtual_memory -- -D warnings

clippy_no_std:
name: Clippy (no_std)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
Expand Down

0 comments on commit 060c503

Please sign in to comment.