Skip to content

cortex-m-rt CI

cortex-m-rt CI #374

Workflow file for this run

on:
push:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
name: cortex-m-rt CI
jobs:
rt-ci-linux:
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental || false }}
strategy:
matrix:
rust: [nightly, stable, 1.60.0]
include:
# Nightly is only for reference and allowed to fail
- rust: nightly
experimental: true
defaults:
run:
working-directory: cortex-m-rt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Install all Rust targets for ${{ matrix.rust }}
run: rustup target install --toolchain=${{ matrix.rust }} thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
- name: Install qemu and gcc
run: sudo apt-get update && sudo apt-get install qemu-system-arm gcc-arm-none-eabi
- name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
run: TARGET=x86_64-unknown-linux-gnu TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv6m-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv6m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7m-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv7m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv7em-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv7em-none-eabihf under ${{ matrix.rust }}
run: TARGET=thumbv7em-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.base-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv8m.base-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabi under ${{ matrix.rust }}
run: TARGET=thumbv8m.main-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
- name: Run CI script for thumbv8m.main-none-eabihf under ${{ matrix.rust }}
run: TARGET=thumbv8m.main-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
# On macOS and Windows, we at least make sure that all examples build and link.
rt-ci-other-os:
strategy:
matrix:
os:
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: cortex-m-rt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install all Rust targets
run: rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
- name: Remove examples that pass by failing
run: rm examples/data_overflow.rs
- name: Build examples for thumbv6m-none-eabi
run: cargo build --target=thumbv6m-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7m-none-eabi
run: cargo build --target=thumbv7m-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7em-none-eabi
run: cargo build --target=thumbv7em-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7em-none-eabihf
run: cargo build --target=thumbv7em-none-eabihf --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.base-none-eabi
run: cargo build --target=thumbv8m.base-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.main-none-eabi
run: cargo build --target=thumbv8m.main-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv8m.main-none-eabihf
run: cargo build --target=thumbv8m.main-none-eabihf --features cortex-m/critical-section-single-core --examples
- name: Build crate for host OS
run: cargo build