From ec53a9bd92e590569d98334adc800bb92303f76f Mon Sep 17 00:00:00 2001 From: Vladimir Umek Date: Wed, 30 Sep 2026 09:49:56 +0200 Subject: [PATCH 1/5] Add build test --- .github/workflows/Build.yml | 56 +++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/Build.yml diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml new file mode 100644 index 0000000..30e1e20 --- /dev/null +++ b/.github/workflows/Build.yml @@ -0,0 +1,56 @@ +name: Build example + +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout this repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Install vcpkg + uses: ARM-software/cmsis-actions/setup-vcpkg@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 + + - name: Install tools + uses: ARM-software/cmsis-actions/vcpkg@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 + with: + config: "./vcpkg-configuration.json" + cache: "Tools" + + - name: Activate Arm tool license + uses: ARM-software/cmsis-actions/armlm@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 + + - name: Initialize CMSIS pack root folder + run: | + cpackget init https://www.keil.com/pack/index.pidx + cpackget update-index + + - name: Cache CMSIS packs + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + key: cmsis-packs-${{ hashFiles('**/*.csolution.yml', '**/*.cproject.yml', '**/*.clayer.yml') }} + restore-keys: | + cmsis-packs- + path: /home/runner/.cache/arm/packs + + - name: Build Ethos-U55 with AC6 + run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain AC6 + + - name: Build Ethos-U85 with AC6 + run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain AC6 + + - name: Build Ethos-U55 with GCC + run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain GCC + + - name: Build Ethos-U85 with GCC + run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain GCC diff --git a/README.md b/README.md index e04e6f3..f79c1d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![License](https://img.shields.io/github/license/Arm-Examples/CMSIS-Ethos-Integration?label=License)](./LICENSE) +[![Build](https://img.shields.io/github/actions/workflow/status/Arm-Examples/CMSIS-Ethos-Integration/Build.yml?logo=arm&logoColor=0091bd&label=Build%20example)](https://github.com/Arm-Examples/CMSIS-Ethos-Integration/tree/main/.github/workflows/Build.yml) # CMSIS-Ethos-Integration From 22bb7048577c4bb6e8277d72632faf37889c660b Mon Sep 17 00:00:00 2001 From: Vladimir Umek Date: Wed, 30 Sep 2026 10:23:05 +0200 Subject: [PATCH 2/5] Add CMSIS-Ethos-U as local pack --- .github/workflows/Build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 30e1e20..bb11daf 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -18,6 +18,12 @@ jobs: - name: Checkout this repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - name: Checkout Ethos-U pack repository + uses: actions/checkout@v7 + with: + repository: VladimirUmek/Ethos-U + path: CMSIS-Ethos-U + - name: Install vcpkg uses: ARM-software/cmsis-actions/setup-vcpkg@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 @@ -35,6 +41,10 @@ jobs: cpackget init https://www.keil.com/pack/index.pidx cpackget update-index + - name: Register local pack + run: | + cpackget add ./CMSIS-Ethos-U/ARM.CMSIS-Ethos-U.pdsc + - name: Cache CMSIS packs uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: From dfef2c493c5ee9748b8747552d101d23644f4fb4 Mon Sep 17 00:00:00 2001 From: Vladimir Umek Date: Wed, 30 Sep 2026 10:43:42 +0200 Subject: [PATCH 3/5] Try out parallel jobs --- .github/workflows/Build.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index bb11daf..89f46a7 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -11,7 +11,7 @@ permissions: contents: read jobs: - build: + Build_Example: runs-on: ubuntu-latest steps: @@ -53,14 +53,15 @@ jobs: cmsis-packs- path: /home/runner/.cache/arm/packs - - name: Build Ethos-U55 with AC6 - run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain AC6 + - parallel: + - name: Build Ethos-U55 with AC6 + run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain AC6 --output build-u55-ac6 - - name: Build Ethos-U85 with AC6 - run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain AC6 + - name: Build Ethos-U85 with AC6 + run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain AC6 --output build-u85-ac6 - - name: Build Ethos-U55 with GCC - run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain GCC + - name: Build Ethos-U55 with GCC + run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain GCC --output build-u55-gcc - - name: Build Ethos-U85 with GCC - run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain GCC + - name: Build Ethos-U85 with GCC + run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain GCC --output build-u85-gcc From e59e1291e142ab7abfa54c7edeffc2a1bec46420 Mon Sep 17 00:00:00 2001 From: Vladimir Umek Date: Wed, 30 Sep 2026 11:04:36 +0200 Subject: [PATCH 4/5] Try installing required packs before build --- .github/workflows/Build.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 89f46a7..6c8d247 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -41,10 +41,6 @@ jobs: cpackget init https://www.keil.com/pack/index.pidx cpackget update-index - - name: Register local pack - run: | - cpackget add ./CMSIS-Ethos-U/ARM.CMSIS-Ethos-U.pdsc - - name: Cache CMSIS packs uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: @@ -53,15 +49,31 @@ jobs: cmsis-packs- path: /home/runner/.cache/arm/packs + - name: Register local pack + run: cpackget add ./CMSIS-Ethos-U/ARM.CMSIS-Ethos-U.pdsc + + - name: Install required CMSIS packs + shell: bash + run: | + packs="$RUNNER_TEMP/missing-packs.txt" + { + csolution list packs Test-Ethos-U55.csolution.yml -m + csolution list packs Test-Ethos-U85.csolution.yml -m + } | sort -u > "$packs" + + if [[ -s "$packs" ]]; then + cpackget add -f "$packs" --agree-embedded-license + fi + - parallel: - name: Build Ethos-U55 with AC6 - run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain AC6 --output build-u55-ac6 + run: cbuild Test-Ethos-U55.csolution.yml --toolchain AC6 --output build-u55-ac6 - name: Build Ethos-U85 with AC6 - run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain AC6 --output build-u85-ac6 + run: cbuild Test-Ethos-U85.csolution.yml --toolchain AC6 --output build-u85-ac6 - name: Build Ethos-U55 with GCC - run: cbuild Test-Ethos-U55.csolution.yml --packs --toolchain GCC --output build-u55-gcc + run: cbuild Test-Ethos-U55.csolution.yml --toolchain GCC --output build-u55-gcc - name: Build Ethos-U85 with GCC - run: cbuild Test-Ethos-U85.csolution.yml --packs --toolchain GCC --output build-u85-gcc + run: cbuild Test-Ethos-U85.csolution.yml --toolchain GCC --output build-u85-gcc From f2522e640e02d6d74f35f4e56c4b15eece37a38d Mon Sep 17 00:00:00 2001 From: Vladimir Umek Date: Wed, 30 Sep 2026 13:20:28 +0200 Subject: [PATCH 5/5] Use matrix build --- .github/workflows/Build.yml | 53 +++++++++++++------------------------ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 6c8d247..8bf406f 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -3,17 +3,31 @@ name: Build example on: workflow_dispatch: pull_request: - branches: [main] push: branches: [main] permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - Build_Example: + build: + name: ${{ matrix.solution }} (${{ matrix.toolchain }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - { solution: Test-Ethos-U55, toolchain: AC6 } + - { solution: Test-Ethos-U55, toolchain: GCC } + - { solution: Test-Ethos-U85, toolchain: AC6 } + - { solution: Test-Ethos-U85, toolchain: GCC } + steps: - name: Checkout this repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -41,39 +55,8 @@ jobs: cpackget init https://www.keil.com/pack/index.pidx cpackget update-index - - name: Cache CMSIS packs - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - key: cmsis-packs-${{ hashFiles('**/*.csolution.yml', '**/*.cproject.yml', '**/*.clayer.yml') }} - restore-keys: | - cmsis-packs- - path: /home/runner/.cache/arm/packs - - name: Register local pack run: cpackget add ./CMSIS-Ethos-U/ARM.CMSIS-Ethos-U.pdsc - - name: Install required CMSIS packs - shell: bash - run: | - packs="$RUNNER_TEMP/missing-packs.txt" - { - csolution list packs Test-Ethos-U55.csolution.yml -m - csolution list packs Test-Ethos-U85.csolution.yml -m - } | sort -u > "$packs" - - if [[ -s "$packs" ]]; then - cpackget add -f "$packs" --agree-embedded-license - fi - - - parallel: - - name: Build Ethos-U55 with AC6 - run: cbuild Test-Ethos-U55.csolution.yml --toolchain AC6 --output build-u55-ac6 - - - name: Build Ethos-U85 with AC6 - run: cbuild Test-Ethos-U85.csolution.yml --toolchain AC6 --output build-u85-ac6 - - - name: Build Ethos-U55 with GCC - run: cbuild Test-Ethos-U55.csolution.yml --toolchain GCC --output build-u55-gcc - - - name: Build Ethos-U85 with GCC - run: cbuild Test-Ethos-U85.csolution.yml --toolchain GCC --output build-u85-gcc + - name: Build ${{ matrix.solution }} + run: cbuild "${{ matrix.solution }}.csolution.yml" --packs --toolchain "${{ matrix.toolchain }}"