-
Notifications
You must be signed in to change notification settings - Fork 30
154 lines (126 loc) · 4.34 KB
/
main.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Integration tests
on:
pull_request:
push:
jobs:
mbed-examples:
container:
image: ghcr.io/armmbed/mbed-os-env:master-latest
runs-on: ubuntu-latest
strategy:
matrix:
target: [K64F, DISCO_L475VG_IOT01A, NRF52840_DK]
example:
- mbed-os-example-blinky
- mbed-os-example-blinky-baremetal
profile: [release, debug, develop]
include:
- example: mbed-os-example-kvstore
target: K64F
profile: develop
- example: mbed-os-example-ble
subexample: BLE_Advertising
target: NRF52840_DK
profile: develop
- example: mbed-os-example-cellular
target: WIO_3G
profile: develop
- example: mbed-os-example-devicekey
target: K66F
profile: develop
- example: mbed-os-example-lorawan
target: DISCO_L072CZ_LRWAN1
profile: develop
- example: mbed-os-example-mbed-crypto
subexample: getting-started
target: K64F
profile: develop
- example: mbed-os-example-nfc
subexample: NFC_EEPROM
target: DISCO_L475VG_IOT01A
profile: develop
- example: mbed-os-example-sockets
target: K64F
profile: develop
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: mbedtools
- name: Install tools
run: pip install ./mbedtools
- name: Build
run: |
set -e
# We use manual clone with depth=1 and single branch for speed
git clone --depth=1 --single-branch --branch development https://github.com/ARMmbed/${{ matrix.example }}.git
if [ -z ${{ matrix.subexample }} ]; then
cd ${{ matrix.example }}
else
cd ${{ matrix.example }}/${{ matrix.subexample }}
fi
mbed-tools deploy
mbed-tools -vvv compile -t GCC_ARM -m ${{ matrix.target }} --profile ${{ matrix.profile }}
test-project-management:
container:
image: ghcr.io/armmbed/mbed-os-env:master-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: mbedtools
- name: Install tools
run: pip install ./mbedtools
- name: New project with new directory
run: |
mbedtools new test
cd test
mbedtools compile -t GCC_ARM -m K64F
- name: New project in pwd
run: |
mkdir mbed-os-example && cd mbed-os-example
mbedtools new .
mbedtools compile -t GCC_ARM -m K64F
- name: Import
run: |
mbedtools import mbed-os-example-ble
cd mbed-os-example-ble
# Checkout the development branch on BLE example
git fetch origin development
git checkout FETCH_HEAD
cd BLE_Advertising
mbedtools deploy
mbedtools compile -t GCC_ARM -m K64F
- name: Deploy
run: |
mkdir deploy-test
cd deploy-test
echo "https://github.com/ARMmbed/mbed-os" > mbed-os.lib
git clone --branch=latest https://github.com/ARMmbed/mbed-os.git
mbedtools -vvv deploy
cd mbed-os
git branch --points-at origin/HEAD
git branch --points-at origin/HEAD | grep -q "\*" || (echo "Couldn't
see current branch points at default branch" && false)
test-custom-target:
container:
image: ghcr.io/armmbed/mbed-os-env:master-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: mbedtools
- name: Install tools
run: pip install ./mbedtools
- name: Build
run: |
mbedtools new custom-target-test
cd custom-target-test
cp ../mbedtools/ci/test-data/custom_targets.json .
mkdir TARGET_IMAGINARYBOARD
cp ../mbedtools/ci/test-data/TARGET_IMAGINARYBOARD/* TARGET_IMAGINARYBOARD
cp mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/P* TARGET_IMAGINARYBOARD
sed -i '/add_subdirectory(${MBED_PATH})/i add_subdirectory(TARGET_IMAGINARYBOARD)' CMakeLists.txt
mbedtools compile -t GCC_ARM -m IMAGINARYBOARD