Skip to content

Commit

Permalink
Split CI jobs
Browse files Browse the repository at this point in the history
Intended benefits

- More parallelism

- Failures are clearer at a glance
  • Loading branch information
Ericson2314 committed Feb 10, 2023
1 parent 4b57723 commit 3058db1
Showing 1 changed file with 60 additions and 6 deletions.
66 changes: 60 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
clippy_fmt_test:
clippy:
runs-on: ubuntu-latest

strategy:
Expand All @@ -26,29 +26,83 @@ jobs:
uses: fiam/[email protected]
with:
release: '9-2019-q4'
- name: Install clang
run: sudo apt-get update && sudo apt install -y clang
- name: Install toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
components: rust-src, rustfmt, clippy
override: true
components: rust-src, clippy
- uses: actions/checkout@v2
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -Z build-std=core --target ./${{ matrix.target }}.json -- -D warnings
args: --target ./${{ matrix.target }}.json
fmt:
runs-on: ubuntu-latest
steps:
- name: Install toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src, rustfmt
- uses: actions/checkout@v2
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

build:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["nanos", "nanox", "nanosplus"]

steps:
- name: arm-none-eabi-gcc
uses: fiam/[email protected]
with:
release: '9-2019-q4'
- name: Install clang
run: sudo apt-get update && sudo apt install -y clang
- name: Install toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
- uses: actions/checkout@v2
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --target ./${{ matrix.target }}.json

test:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["nanos", "nanox", "nanosplus"]

steps:
- name: arm-none-eabi-gcc
uses: fiam/[email protected]
with:
release: '9-2019-q4'
- name: Install clang
run: sudo apt-get update && sudo apt install -y clang
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y qemu-user-static
pip install speculos --extra-index-url https://test.pypi.org/simple/
- uses: actions/checkout@v2
- name: Unit tests
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 3058db1

Please sign in to comment.