-
Notifications
You must be signed in to change notification settings - Fork 57
92 lines (85 loc) · 2.62 KB
/
ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
on:
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue
workflow_dispatch: # Run CI when manually requested
schedule:
# Run every week at 8am UTC Saturday
- cron: '0 8 * * SAT'
name: Continuous integration
jobs:
check:
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- thumbv6m-none-eabi
- thumbv7m-none-eabi
toolchain:
- stable
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: cargo check --target=${{ matrix.target }} --example global_alloc
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo check --target=${{ matrix.target }} --examples --all-features
- uses: imjohnbo/issue-bot@v3
if: |
failure()
&& github.event_name == 'schedule'
with:
title: CI Failure
labels: ci
body: |
Scheduled CI run failed. Details:
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
targets: thumbv7m-none-eabi
toolchain: nightly
- name: Install QEMU
run: |
sudo apt update
sudo apt install qemu-system-arm
- run: qemu-system-arm --version
- run: cargo run --target thumbv7m-none-eabi --example llff_integration_test --all-features
- run: cargo run --target thumbv7m-none-eabi --example tlsf_integration_test --all-features
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
toolchain: nightly
targets: thumbv6m-none-eabi
- run: cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt -- --check
rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: rustdoc
run: cargo rustdoc --all-features