-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (73 loc) · 2.21 KB
/
Copy pathci.yml
File metadata and controls
83 lines (73 loc) · 2.21 KB
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
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 and nightly Rust
rust: [stable, nightly]
# include:
# # Run check with MSRV as well
# - rust: 1.59.0
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: 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@v1
id: cache-cargo
with:
path: ~/cargo-bin
key: ${{ runner.os }}-svd2rust-0.28.0
- name: Install svd2rust
if: steps.cache-cargo.outputs.cache-hit != 'true'
uses: actions-rs/install@v0.1
with:
crate: svd2rust
version: 0.28.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/install@v0.1
with:
crate: form
version: 0.10.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: Build PAC
run: ./scripts/regenerate-rust-code.sh soc602_reg.svd src
- name: Check PAC
uses: actions-rs/cargo@v1
with:
command: check