Skip to content

ci: set up matrix bot #107

ci: set up matrix bot

ci: set up matrix bot #107

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
container:
image: ghcr.io/kaspar030/riot.rs-build:v0.0.2
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
strategy:
fail-fast: false
matrix:
partition: [ "1/5", "2/5", "3/5", "4/5", "5/5" ]
steps:
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.partition }}"
- uses: taiki-e/install-action@v2
with:
tool: cargo-binstall
- name: Check out repository code
uses: actions/checkout@v4
- name: "installing prerequisites"
run: |
git config --global init.defaultBranch main
git config --global user.email "ci@riot-labs.de"
git config --global user.name "CI"
cargo binstall -y --no-symlinks laze
cargo binstall -y --no-symlinks c2rust
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: "riot-rs compilation test"
run: |
sccache --start-server || true # work around https://github.com/ninja-build/ninja/issues/2052
laze build --partition hash:${{ matrix.partition }} --builders microbit-v2,nrf52840dk,rpi-pico -g
CI-success:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [CI]
steps:
- run: |
result="${{ needs.CI.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi