-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (47 loc) · 1.36 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
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
uses: mozilla-actions/sccache-action@v0.0.3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: 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: |
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"
cargo binstall -y --no-symlinks laze
cargo binstall -y --no-symlinks c2rust
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: "riot-rs compilation test"
run: laze build --partition hash:${{ matrix.partition }}/5 --builders nrf52840dk -g