|
1 | | -name: Package core |
| 1 | +name: Package, test and upload core |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - arduino |
| 7 | + pull_request: |
4 | 8 |
|
5 | 9 | jobs: |
6 | | - build: |
| 10 | + |
| 11 | + package-core: |
| 12 | + name: Build and package core |
7 | 13 | runs-on: ubuntu-latest |
8 | 14 | env: |
9 | 15 | ZEPHYR_SDK_INSTALL_DIR: /opt/zephyr-sdk-0.16.8 |
| 16 | + CCACHE_IGNOREOPTIONS: -specs=* |
10 | 17 | steps: |
11 | 18 | - name: Install toolchain |
12 | 19 | working-directory: /opt |
13 | 20 | run: | |
14 | 21 | sudo apt-get update |
15 | | - sudo apt-get install -y --no-install-recommends git cmake wget python3-pip ninja-build |
16 | | - wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.8/zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz |
| 22 | + sudo apt-get install -y --no-install-recommends git cmake wget python3-pip ninja-build ccache |
| 23 | + wget -nv https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.8/zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz |
17 | 24 | tar xf zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz && cd zephyr-sdk-0.16.8 && ./setup.sh -t arm-zephyr-eabi -c |
18 | 25 |
|
19 | 26 | - uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + fetch-depth: 0 |
| 29 | + persist-credentials: false |
20 | 30 |
|
21 | 31 | - name: Initialize |
22 | 32 | run: | |
23 | | - ./extra/bootstrap.sh |
24 | | - ./extra/build_all.sh |
25 | | - ./extra/package.sh `git describe --always` |
26 | | - mv ../arduino-core-zephyr-llext* . |
| 33 | + ./extra/bootstrap.sh -o=--filter=tree:0 |
| 34 | + echo "CORE_TAG=$(git describe --always)" >> "$GITHUB_ENV" |
| 35 | + echo "CORE_ARTIFACT=ArduinoCore-zephyr-$(git describe --always)" >> "$GITHUB_ENV" |
| 36 | + echo "BOARD_NAMES=[ $(cat boards.txt | grep '^[^#]*\.build\.variant' | cut -d '.' -f 1 | xargs printf '"%s",' | sed -e 's/,$//') ]" >> "$GITHUB_ENV" |
| 37 | +
|
| 38 | + - name: ccache |
| 39 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 40 | + with: |
| 41 | + verbose: 1 |
| 42 | + |
| 43 | + - name: Build variants |
| 44 | + run: | |
| 45 | + ./extra/build_all.sh -f |
| 46 | +
|
| 47 | + - name: Package |
| 48 | + run: | |
| 49 | + ./extra/package.sh ${{ env.CORE_TAG }} |
| 50 | + mv ../${{ env.CORE_ARTIFACT }}.tar.bz2 . |
27 | 51 |
|
28 | 52 | - name: Archive core |
29 | 53 | uses: actions/upload-artifact@v4 |
30 | 54 | with: |
31 | | - name: Core |
32 | | - path: arduino-core-zephyr-llext* |
| 55 | + name: ${{ env.CORE_ARTIFACT }} |
| 56 | + path: ${{ env.CORE_ARTIFACT }}.tar.bz2 |
33 | 57 |
|
34 | 58 | - name: Create Blink sketch |
35 | 59 | run: | |
|
0 commit comments