Skip to content

Commit 32d9225

Browse files
0xc0170hugueskamba
andcommitted
Travis: add more examples we should support
Co-authored-by: Hugues Kamba <[email protected]>
1 parent e419e41 commit 32d9225

File tree

1 file changed

+49
-9
lines changed

1 file changed

+49
-9
lines changed

.travis.yml

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,25 @@ matrix:
140140
- pip install --upgrade mbed-tools
141141
# We use manual clone, with depth and single branch = the fastest
142142
# Because of this, we need to create .mbed file as the current tools require it
143+
- git clone --depth=1 --single-branch --branch feature-cmake https://github.com/ARMmbed/${EXAMPLE_NAME}.git;
143144
- >-
144-
git clone --depth=1 --single-branch --branch feature-cmake https://github.com/ARMmbed/${EXAMPLE_NAME}.git;
145-
cd ${EXAMPLE_NAME};
146-
git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git;
147-
cd mbed-os;
148-
git fetch origin +refs/pull/${TRAVIS_PULL_REQUEST}/merge;
149-
git checkout -qf FETCH_HEAD
145+
if [ -z ${SUBEXAMPLE_NAME} ]; then
146+
cd ${EXAMPLE_NAME};
147+
else
148+
cd ${EXAMPLE_NAME}/${SUBEXAMPLE_NAME};
149+
fi
150+
- >-
151+
git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git;
152+
cd mbed-os;
153+
git fetch origin +refs/pull/${TRAVIS_PULL_REQUEST}/merge;
154+
git checkout -qf FETCH_HEAD
150155
- >-
151156
cd -;
152-
touch .mbed;
153-
mbedtools configure -t GCC_ARM -m ${TARGET_NAME};
154-
mkdir -p build
157+
# Replace the content of mbed-os.lib to stay on ${TRAVIS_PULL_REQUEST}
158+
- echo “” > mbed-os.lib
159+
- mbedtools checkout;
160+
- mbedtools configure -t GCC_ARM -m ${TARGET_NAME};
161+
- mkdir -p build
155162
script:
156163
- cd build && cmake .. -GNinja -DCMAKE_BUILD_TYPE=${PROFILE} && cmake --build .
157164

@@ -187,6 +194,39 @@ matrix:
187194
name: "CMake blinky example - debug (NRF52840_DK)"
188195
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-blinky TARGET_NAME=NRF52840_DK PROFILE=debug
189196

197+
- <<: *cmake-build-test
198+
name: "CMake kvstore example (K64F)"
199+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-kvstore TARGET_NAME=K64F
200+
201+
- <<: *cmake-build-test
202+
name: "CMake ble example (NRF52840_DK)"
203+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-ble TARGET_NAME=NRF52840_DK SUBEXAMPLE_NAME=BLE_Button
204+
205+
- <<: *cmake-build-test
206+
name: "CMake cellular example (WIO_3G)"
207+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-cellular TARGET_NAME=WIO_3G
208+
209+
- <<: *cmake-build-test
210+
name: "CMake devicekey example (K66F)"
211+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-devicekey TARGET_NAME=K66F
212+
213+
- <<: *cmake-build-test
214+
name: "CMake lorawan example (K66F)"
215+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-lorawan TARGET_NAME=K66F
216+
217+
- <<: *cmake-build-test
218+
name: "CMake crypto example (K64F)"
219+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-mbed-crypto TARGET_NAME=K64F SUBEXAMPLE_NAME=getting-started
220+
221+
- <<: *cmake-build-test
222+
name: "CMake nfc example (DISCO_L475VG_IOT01A)"
223+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-nfc TARGET_NAME=DISCO_L475VG_IOT01A SUBEXAMPLE_NAME=NFC_EEPROM
224+
225+
- <<: *cmake-build-test
226+
name: "CMake sockets example (K64F)"
227+
env: NAME=cmake_test EXAMPLE_NAME=mbed-os-example-sockets TARGET_NAME=K64F
228+
229+
190230

191231
### Docs Tests ###
192232
- &docs-vm

0 commit comments

Comments
 (0)