| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
types: [opened, synchronize, reopened, ready_for_review] |
| 6 |
merge_group: |
| 7 |
types: [checks_requested] |
| 8 |
push: |
| 9 |
branches: [master] |
| 10 |
|
| 11 |
permissions: |
| 12 |
contents: read |
| 13 |
|
| 14 |
concurrency: |
| 15 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 16 |
cancel-in-progress: true |
| 17 |
|
| 18 |
env: |
| 19 |
CARGO_TERM_COLOR: always |
| 20 |
|
| 21 |
jobs: |
| 22 |
read_msrv: |
| 23 |
name: Read MSRV |
| 24 |
uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@b95a3a81b0efee6438b858b41a84aff627e01351 # v0.1.1 |
| 25 |
|
| 26 |
rust: |
| 27 |
needs: read_msrv |
| 28 |
|
| 29 |
strategy: |
| 30 |
fail-fast: false |
| 31 |
matrix: |
| 32 |
os: |
| 33 |
- { name: Linux, runner: ubuntu-latest } |
| 34 |
- { name: macOS, runner: macos-latest } |
| 35 |
- { name: Windows, runner: windows-latest } |
| 36 |
toolchain: |
| 37 |
- { name: stable, version: stable } |
| 38 |
- { name: msrv, version: "${{ needs.read_msrv.outputs.msrv }}" } |
| 39 |
|
| 40 |
name: ${{ matrix.os.name }} / ${{ matrix.toolchain.name }} |
| 41 |
runs-on: ${{ matrix.os.runner }} |
| 42 |
|
| 43 |
steps: |
| 44 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 45 |
|
| 46 |
- name: Install Rust (${{ matrix.toolchain.name }}) |
| 47 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 48 |
with: |
| 49 |
toolchain: ${{ matrix.toolchain.version }} |
| 50 |
target: thumbv6m-none-eabi |
| 51 |
|
| 52 |
- name: Install just, nextest |
| 53 |
uses: taiki-e/install-action@065d6a08a14e61e89fb0a4c10eecdbdef39c7d8e # v2.85.4 |
| 54 |
with: |
| 55 |
tool: just,nextest |
| 56 |
|
| 57 |
- name: Work around MSRV issues |
| 58 |
if: matrix.toolchain.name == 'msrv' |
| 59 |
run: just downgrade-for-msrv |
| 60 |
|
| 61 |
- name: Test |
| 62 |
run: just test |
| 63 |
|
| 64 |
- name: Build (no-std) |
| 65 |
if: matrix.toolchain.name == 'stable' |
| 66 |
run: just build-no-std |