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 335f835

Browse files
Merge pull request #208 from pillo79/ci-fix
ci: replace Docker image
2 parents 3ac4639 + 310ca68 commit 335f835

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

‎.github/workflows/build.yml‎

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,58 @@ jobs:
66
build:
77
name: Build native Zephyr samples
88
runs-on: ubuntu-latest
9-
container: zephyrprojectrtos/ci:latest
9+
container: zephyrprojectrtos/ci-base:latest
1010
env:
1111
CMAKE_PREFIX_PATH: /opt/toolchains
1212
CCACHE_IGNOREOPTIONS: -specs=*
13-
REPOSITORY: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
14-
BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
13+
MODULE_PATH: ../modules/lib/ArduinoCore-zephyr
14+
15+
# action-setup-zephyr will initialize the repo in $GITHUB_WORKSPACE/..,
16+
# so we need to put the module in $GITHUB_WORKSPACE's parent, but
17+
# actions/checkout would not be able to checkout the module there
18+
# directly, so we use "subfolder" and move it later.
19+
#
20+
# using action-setup-zephyr also requires a local west.yml and so the
21+
# folder must be manually added to Zephyr as a module via
22+
# EXTRA_ZEPHYR_MODULES.
23+
1524
steps:
16-
- name: Initialize
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
persist-credentials: false
29+
path: subfolder
30+
31+
- name: Fix module path, list needed HALs
1732
run: |
18-
mkdir build && cd build
19-
west init -m https://github.com/${{ env.REPOSITORY }} --mr ${{ env.BRANCH }}
20-
west update -o=--filter=tree:0
33+
mkdir -p $(dirname $MODULE_PATH) && mv subfolder $MODULE_PATH
34+
NEEDED_HALS=$(grep 'build.zephyr_hals=' $MODULE_PATH/boards.txt | cut -d '=' -f 2 | xargs -n 1 echo | sort -u)
35+
HAL_FILTER="-hal_.*"
36+
for hal in $NEEDED_HALS; do
37+
HAL_FILTER="$HAL_FILTER,+$hal"
38+
done
39+
echo "HAL_FILTER=$HAL_FILTER" | tee -a $GITHUB_ENV
2140
22-
- name: ccache
23-
uses: hendrikmuhs/ccache-action@v1.2
41+
- name: Setup Zephyr project
42+
uses: zephyrproject-rtos/action-zephyr-setup@v1
2443
with:
25-
verbose: 1
44+
toolchains: arm-zephyr-eabi
45+
manifest-file-name: ${{ env.MODULE_PATH }}/west.yml
46+
west-project-filter: ${{ env.HAL_FILTER }}
47+
enable-ccache: false
48+
49+
- name: Add manifest path as module
50+
run: |
51+
echo EXTRA_ZEPHYR_MODULES="$(pwd)/$MODULE_PATH" >> $GITHUB_ENV
2652
2753
- name: Build fade
28-
working-directory: build
2954
run: |
30-
west build -p -b arduino_nano_33_ble//sense modules/lib/ArduinoCore-zephyr/samples/fade
55+
west build -p -b arduino_nano_33_ble//sense $MODULE_PATH/samples/fade
3156
3257
- name: Build i2cdemo
33-
working-directory: build
3458
run: |
35-
west build -p -b ek_ra8d1 modules/lib/ArduinoCore-zephyr/samples/i2cdemo
59+
west build -p -b ek_ra8d1 $MODULE_PATH/samples/i2cdemo
3660
3761
- name: Build adc
38-
working-directory: build
3962
run: |
40-
west build -p -b arduino_nano_33_ble/nrf52840/sense modules/lib/ArduinoCore-zephyr/samples/analog_input
63+
west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/analog_input

0 commit comments

Comments
(0)

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