Use bitbybit #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
name: Build | |
jobs: | |
# Build the workspace for a target architecture | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
- name: Build | |
run: | | |
cargo build --target ${{ matrix.target }} | |
# Build the host tools | |
build-host: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- name: Build | |
run: | | |
cd arm-targets | |
cargo build | |
# Build the workspace for the target architecture but using Ferrocene | |
build-ferrocene: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- armv7r-none-eabihf | |
- armv8r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install criticalup | |
run: | | |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ferrocene/criticalup/releases/download/v1.2.0/criticalup-installer.sh | sh | |
- name: Install Ferrocene | |
env: | |
CRITICALUP_TOKEN: ${{ secrets.CRITICALUP_TOKEN }} | |
run: | | |
criticalup install | |
- name: Build | |
run: | | |
criticalup run cargo build --target ${{ matrix.target }} | |
# Gather all the above build jobs together for the purposes of getting an overall pass-fail | |
build-all: | |
runs-on: ubuntu-latest | |
needs: [build, build-ferrocene, build-host] | |
steps: | |
- run: /bin/true | |
# Build the docs for the workspace | |
docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
- name: Build docs | |
run: | | |
cargo doc --target ${{ matrix.target }} | |
# Build the docs for the host tools | |
docs-host: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- name: Build docs | |
run: | | |
cd arm-targets | |
cargo doc | |
# Gather all the above doc jobs together for the purposes of getting an overall pass-fail | |
docs-all: | |
runs-on: ubuntu-latest | |
needs: [docs, docs-host] | |
steps: | |
- run: /bin/true | |
# Format the workspace | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install stable | |
rustup default stable | |
- name: Format | |
run: | | |
cargo fmt --check | |
# Format the host tools | |
fmt-host: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install stable | |
rustup default stable | |
- name: Format | |
run: | | |
cd arm-targets | |
cargo fmt --check | |
# Gather all the above fmt jobs together for the purposes of getting an overall pass-fail | |
fmt-all: | |
runs-on: ubuntu-latest | |
needs: [fmt, fmt-host] | |
steps: | |
- run: /bin/true | |
# Run clippy on the workpace | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
rustup component add clippy | |
- name: Clippy | |
run: | | |
cargo clippy --target ${{ matrix.target }} | |
# Run clippy on the host tools | |
clippy-host: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, 1.82] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup component add clippy | |
- name: Clippy | |
run: | | |
cd arm-targets | |
cargo clippy | |
# Gather all the above clippy jobs together for the purposes of getting an overall pass-fail | |
clippy-all: | |
runs-on: ubuntu-latest | |
needs: [clippy, clippy-host] | |
steps: | |
- run: /bin/true | |
# Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail | |
all: | |
runs-on: ubuntu-latest | |
needs: [docs-all, build-all, fmt-all] # not gating on clippy-all | |
steps: | |
- run: /bin/true |