Skip to content

Commit

Permalink
Improve CI pipeline
Browse files Browse the repository at this point in the history
Improve the CI pipeline by doing:

- Run docs build with stable/nightly as required
- Run 32 bit tests (default features with a 32 bit target)
- Run cross tests (default features with a s390x target)
  • Loading branch information
tcharding committed Apr 3, 2023
1 parent ef35d89 commit d4191cc
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- name: Running test script
env:
DO_LINT: true
DO_DOCS: true
DO_FEATURE_MATRIX: true
run: ./contrib/test.sh

Expand Down Expand Up @@ -45,6 +46,7 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: Running test script
env:
DO_DOCSRS: true
DO_FMT: true
run: ./contrib/test.sh

Expand Down Expand Up @@ -100,3 +102,36 @@ jobs:
RUSTFLAGS: "-C link-arg=-Tlink.x"
CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel"
run: cd embedded/no-allocator && cargo run --target thumbv7m-none-eabi

Arch32bit:
name: Test 32-bit version
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Add architecture i386
run: sudo dpkg --add-architecture i386
- name: Install i686 gcc
run: sudo apt-get update -y && sudo apt-get install -y gcc-multilib
- name: Install target
run: rustup target add i686-unknown-linux-gnu
- name: Run tests on i686
run: cargo test --target i686-unknown-linux-gnu

Cross:
name: Cross test
if: ${{ !github.event.act }}
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install target
run: rustup target add s390x-unknown-linux-gnu
- name: install cross
run: cargo install cross --locked
- name: run cross test
run: cross test --target s390x-unknown-linux-gnu

0 comments on commit d4191cc

Please sign in to comment.