Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d9e27d8

Browse files
ci: build: general improvements and size reduction
Take inspiration from the Arduino's fork [1] to improve the CI for building and testing samples in the project by using the ci-base zephyr image to save on size. Use the new $MODULE_PATH to specify paths in the setup stages. [1] https://github.com/arduino/ArduinoCore-zephyr/blob/main/.github/workflows/build.yml Signed-off-by: Dhruva Gole <d-gole@ti.com>
1 parent 00a01fa commit d9e27d8

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

‎.github/workflows/build.yml‎

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,53 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
name: Build Arduino-API Zephyr samples
78
runs-on: ubuntu-latest
8-
container: zephyrprojectrtos/ci:latest
9+
container: zephyrprojectrtos/ci-base:latest
910
env:
1011
CMAKE_PREFIX_PATH: /opt/toolchains
12+
CCACHE_IGNOREOPTIONS: -specs=*
13+
MODULE_PATH: ../modules/lib/Arduino-Zephyr-API
14+
1115
steps:
1216
- name: Checkout
1317
uses: actions/checkout@v4
1418
with:
15-
path: Arduino-Zephyr-API
19+
fetch-depth: 0
20+
persist-credentials: false
21+
path: subfolder
22+
23+
- name: Fix module path, list needed HALs
24+
run: |
25+
mkdir -p $(dirname $MODULE_PATH) && mv subfolder $MODULE_PATH
26+
27+
- name: Setup Zephyr project
28+
uses: zephyrproject-rtos/action-zephyr-setup@v1
29+
with:
30+
toolchains: arm-zephyr-eabi
31+
manifest-file-name: ${{ env.MODULE_PATH }}/west.yml
32+
enable-ccache: false
33+
34+
- name: Add manifest path as module
35+
run: |
36+
echo EXTRA_ZEPHYR_MODULES="$(pwd)/$MODULE_PATH" >> $GITHUB_ENV
1637
1738
- name: Initialize
1839
run: |
19-
west init -l Arduino-Zephyr-API/
20-
west update
21-
git clone https://github.com/arduino/ArduinoCore-API.git ArduinoCore-API
22-
mkdir -p modules/lib
23-
ln -s Arduino-Zephyr-API modules/lib/
24-
cp -rfp ArduinoCore-API/api Arduino-Zephyr-API/cores/arduino/
40+
git clone https://github.com/arduino/ArduinoCore-API.git $MODULE_PATH/../ArduinoCore-API
41+
cp -rfp $MODULE_PATH/../ArduinoCore-API/api $MODULE_PATH/cores/arduino/
2542
2643
- name: Build fade
27-
working-directory: Arduino-Zephyr-API
2844
run: |
29-
west build -p -b arduino_nano_33_ble/nrf52840/sense samples/fade
45+
west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/fade
3046
3147
- name: Build i2cdemo
32-
working-directory: Arduino-Zephyr-API
3348
run: |
34-
west build -p -b arduino_nano_33_ble/nrf52840/sense samples/i2cdemo
49+
west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/i2cdemo
3550
3651
- name: Build adc
37-
working-directory: Arduino-Zephyr-API
3852
run: |
39-
west build -p -b beagleconnect_freedom/cc1352p7 samples/analog_input
53+
west build -p -b beagleconnect_freedom/cc1352p7 $MODULE_PATH/samples/analog_input
4054
4155
- name: Archive firmware
4256
uses: actions/upload-artifact@v4

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /