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
name: 'Rust Test CI'
on:
push:
branches:
pull_request:
branches:
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
CARGO_NEXTEST_CACHE_KEY: cargo-nextest-v1
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Install system packages'
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi gnuplot
- name: 'Cache cargo-nextest'
id: cache-cargo-nextest
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-nextest
key: ${{ runner.os }}-${{ env.CARGO_NEXTEST_CACHE_KEY }}
- name: 'Install cargo-nextest'
if: steps.cache-cargo-nextest.outputs.cache-hit != 'true'
run: cargo install cargo-nextest --locked
- name: 'Build and test'
run: |
chmod +x ./build.py
./build.py test