-
Notifications
You must be signed in to change notification settings - Fork 9
79 lines (64 loc) · 1.78 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
name: CI
env:
SVDTOOLS_VERSION: 0.2.7
SVD2RUST_VERSION: 0.25.0
FORM_VERSION: 0.10.0
on:
push:
branches: [ staging, trying, master ]
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
needs: [check]
steps:
- name: Done
run: exit 0
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- lpc81x-pac
- lpc13xx-pac
- lpc546xx-pac
env:
PACS: ${{ matrix.crate }}
CARGO_INCREMENTAL: 0
SVDTOOLS: svdtools
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Install xmllint
run: sudo apt-get update -y && sudo apt-get install -y libxml2-utils python3-pip
- name: Install python deps
run: pip3 install pyyaml
- name: Create working crate
run: make crates
- name: Cache dependencies
uses: Swatinem/rust-cache@v1
with:
working-directory: ${{ matrix.crate }}
key: svdtools-${{ env.SVDTOOLS_VERSION }}-svd2rust-${{ env.SVD2RUST_VERSION }}-form-${{ env.FORM_VERSION }}
- name: Install tools
run: |
cargo install svdtools --version $SVDTOOLS_VERSION --target-dir deps-target
cargo install svd2rust --version $SVD2RUST_VERSION --target-dir deps-target
cargo install form --version $FORM_VERSION --target-dir deps-target
- 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