-
Notifications
You must be signed in to change notification settings - Fork 15
68 lines (66 loc) · 1.77 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- gd32e1
- gd32e2
- gd32e5
- gd32f1
- gd32f2
- gd32f3
env:
CRATES: ${{ matrix.crate }}
CARGO_INCREMENTAL: 0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Install xmllint
run: sudo apt-get install libxml2-utils
- name: Install Python dependencies
run: |
pip3 install --user setuptools wheel
pip3 install --user svdtools
- name: Put pip binary directory into path
run: echo "~/.local/bin" >> $GITHUB_PATH
- name: Cache Cargo installed binaries
uses: actions/cache@v3
id: cache-cargo
with:
path: ~/cargo-bin
key: ${{ runner.os }}-svd2rust-0.30.1
- name: Install svd2rust
if: steps.cache-cargo.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: svd2rust
version: 0.30.1
- name: Copy svd2rust to cache directory
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
mkdir ~/cargo-bin
cp ~/.cargo/bin/svd2rust ~/cargo-bin
- name: Put new cargo binary directory into path
run: echo "~/cargo-bin" >> $GITHUB_PATH
- name: Patch SVDs
run: make -j2 patch
- name: Check SVDs
run: make lint
- name: Build PACs
run: make -j2 svd2rust
- name: Check PACs
run: make -j2 check