-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.49 KB
/
pacs.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
name: PACs
on:
push:
branches: [ master, staging, trying ]
pull_request:
branches:
- 'master'
jobs:
build:
name: Validate PACs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
- name: Add targets
run: rustup target add thumbv6m-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi thumbv8m.main-none-eabihf
- name: Build Crates
run: |
CARGO_TOML_FILES="$(find . -type f -name 'Cargo.toml')"
for d in $CARGO_TOML_FILES; do
pushd "$(dirname -- $d)" >/dev/null
TARGET_FEATURE="$(egrep '^efm32' Cargo.toml | cut -f 1 -d ' ' | head -1)"
BUILD_TARGET="$(grep -e 'default-target' Cargo.toml | cut -f 3 -d ' ' | tr -d '"')"
FEATURES="rt,${TARGET_FEATURE}"
if [[ "$BUILD_TARGET" == "thumbv6m-none-eabi" ]]; then
FEATURES="${FEATURES},critical-section"
fi
cargo check --target="$BUILD_TARGET" --features="$FEATURES"
cargo clean
popd >/dev/null
done
env:
RUSTFLAGS: --deny warnings
ci:
if: ${{ success() }}
# all new jobs must be added to this list
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0