-
Notifications
You must be signed in to change notification settings - Fork 26
47 lines (40 loc) · 1.41 KB
/
snippets_checks.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
# This workflow performs the checks like license check,
# doxygen, unit tests etc.
name: Snippets Checks
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
jobs:
Snippets-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/armmbed/mbed-os-env:master-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Repo structure Tests
run: |
python3 .github/repo_checks.py
- name: Astyle Tests
run: |
wget https://github.com/ARMmbed/mbed-os/raw/master/.astylerc
git --no-pager diff --name-only --diff-filter=dr $(git merge-base --fork-point origin/master) HEAD | ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) | while read file; do astyle -n --options=.astylerc "${file}"; done
git diff --exit-code --diff-filter=dr --color
- name: Checkout mbed OS and libraries
run: |
mkdir -p ../work/snippet/TESTS
cp -r * ../work/snippet/TESTS/
cd ../work
mv snippet/TESTS/mbed-os.lib .
git clone https://github.com/ARMmbed/mbed-os.git mbed-os
mbed config root .
mbed update
mbed add AudioPlayer
mbed add mbed-nfc-m24sr
- name: Compile Tests
run: |
cd ../work
mbed test --compile -m K64F -t GCC_ARM -n snippet-* --app-config=snippet/TESTS/test.json -v