Skip to content

Commit

Permalink
ci: set up matrix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Nov 15, 2023
1 parent 9e8c0b5 commit 15a8916
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ on:
- main

jobs:
test:
CI:
runs-on: ubuntu-latest
container:
image: ghcr.io/kaspar030/riot.rs-build:v0.0.2

env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
container:
image: ghcr.io/kaspar030/riot.rs-build:v0.0.1

strategy:
fail-fast: false
matrix:
partition: [ "1/5", "2/5", "3/5", "4/5", "5/5" ]

steps:
- name: Run sccache-cache
Expand All @@ -29,6 +34,8 @@ jobs:

- name: rust cache
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.partition }}"

- uses: taiki-e/install-action@v2
with:
Expand All @@ -39,7 +46,6 @@ jobs:

- name: "installing prerequisites"
run: |
apt-get install -y ninja-build
git config --global init.defaultBranch main
git config --global user.email "ci@riot-labs.de"
git config --global user.name "CI"
Expand All @@ -48,4 +54,18 @@ jobs:
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: "riot-rs compilation test"
run: laze build --builders nrf52840dk -g
run: laze build --partition hash:${{ matrix.partition }} --builders nrf52840dk -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

0 comments on commit 15a8916

Please sign in to comment.