-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (78 loc) · 2.41 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
name: Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
rust_check:
name: Rust check
runs-on: ubuntu-latest
strategy:
matrix:
# Run checks on stable
rust: [stable]
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Put local binary directory into path
run: |
mkdir -p ~/.local/bin
echo "~/.local/bin" >> $GITHUB_PATH
- name: Cache Cargo installed binaries
uses: actions/cache@v1
id: cache-cargo
with:
path: ~/cargo-bin
key: ${{ runner.os }}-svd2rust-0.17.0
- name: Install xmllint
run: sudo apt-get install libxml2-utils
- name: Install svd2rust
if: steps.cache-cargo.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: svd2rust
version: 0.17.0
- name: Copy svd2rust to cache directory
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cargo-bin
cp ~/.cargo/bin/svd2rust ~/cargo-bin
- name: Install form
if: steps.cache-cargo.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: form
version: 0.7.0
- name: Copy form to cache directory
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cargo-bin
cp ~/.cargo/bin/form ~/cargo-bin
- name: Put new cargo binary directory into path
run: echo "~/cargo-bin" >> $GITHUB_PATH
- name: Install and run SVDConv
run: |
pushd ~/.local/bin
wget https://github.com/ARM-software/CMSIS_5/raw/develop/CMSIS/Utilities/Linux64/SVDConv
chmod 0770 SVDConv
popd
- name: Build PAC
run: ./scripts/regenerate-rust-code.sh soc602_reg.svd src
#- name: Check PAC
# uses: actions-rs/cargo@v1
# with:
# command: check
- name: Check SVD conformance with svdconv
run: ./scripts/svdconv_wrapper.sh
- name: Check SVD XML/schema conformance with xmllint
run: ./scripts/xmllint_wrapper.sh