From b70735fd160a0856bc07de63fa7095102f493e1b Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Wed, 18 Nov 2026 13:29:19 +0100 Subject: [PATCH] Add workflow for building examples with GCC --- .github/workflows/Build_GCC.yml | 82 +++++++++++++++++++++++++++++++++ README.md | 2 + vcpkg-configuration.json | 32 +++++++------ 3 files changed, 102 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/Build_GCC.yml diff --git a/.github/workflows/Build_GCC.yml b/.github/workflows/Build_GCC.yml new file mode 100644 index 0000000..5d77e36 --- /dev/null +++ b/.github/workflows/Build_GCC.yml @@ -0,0 +1,82 @@ +# Copyright (c) 2026 Arm Limited (or its affiliates). All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Build examples with GCC +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + CI: + runs-on: ubuntu-24.04 + + strategy: + fail-fast: false + matrix: + config: + [ # example directory, project, build-type, target-type, toolchain + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: SSE-320-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC } + ] + + steps: + - name: Checkout this repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Install vcpkg + uses: ARM-software/cmsis-actions/setup-vcpkg@v1 + with: + version: 2026.04.27 + + - name: Install required 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 example in ${{matrix.config.dir}} for context ${{matrix.config.project}}.${{matrix.config.build-type}}+${{matrix.config.target-type}} with ${{matrix.config.toolchain}} toolchain + working-directory: ${{matrix.config.dir}} + run: | + cbuild SDS.csolution.yml --context ${{matrix.config.project}}.${{matrix.config.build-type}}+${{matrix.config.target-type}} --toolchain ${{matrix.config.toolchain}} --packs --update-rte diff --git a/README.md b/README.md index 2f0b28d..a381020 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![License](https://img.shields.io/github/license/Arm-Examples/SDS-Examples?label)](https://github.com/Arm-Examples/SDS-Examples/blob/main/LICENSE) [![Build_AC6](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Build_AC6.yml?logo=arm&logoColor=0091bd&label=Build%20examples%20with%20AC6)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Build_AC6.yml) +[![Build_GCC](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Build_GCC.yml?logo=arm&logoColor=0091bd&label=Build%20examples%20with%20GCC)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Build_GCC.yml) [![Test_Alif_E7](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_Alif_E7.yml?logo=arm&logoColor=0091bd&label=Test%20Alif%20AppKit-E7%20example)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_Alif_E7.yml) [![Test_Alif_E8](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_Alif_E8.yml?logo=arm&logoColor=0091bd&label=Test%20Alif%20DevKit-E8%20example)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_Alif_E8.yml) [![Test_ST_KeywordSpotting](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_ST_KeywordSpotting.yml?logo=arm&logoColor=0091bd&label=Test%20ST%20Keyword%20Spotting)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_ST_KeywordSpotting.yml) @@ -76,6 +77,7 @@ Refer to [Understanding GitHub Actions](https://docs.github.com/en/actions/get-s |
CI Workflow
| Description | |--- |--- | | [Build_AC6](./.github/workflows/Build_AC6.yml) | Use Arm Compiler for Embedded (AC6) to create binaries for different configuration of targets, build types, and boards. | +| [Build_GCC](./.github/workflows/Build_GCC.yml) | Use GNU Arm Embedded Toolchain (GCC) to create binaries for different configuration of targets, build types, and boards. | | [Test_Alif_E7](./.github/workflows/Test_Alif_E7.yml) | Build the binary for an object detection algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | | [Test_Alif_E8](./.github/workflows/Test_Alif_E8.yml) | Build the binary for an object detection algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | | [Test_ST_KeywordSpotting](./.github/workflows/Test_ST_KeywordSpotting.yml) | Build the binary for a keyword spotting algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 03d95a6..1032a34 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -1,14 +1,18 @@ -{ - "registries" : [ { - "name" : "arm", - "kind" : "artifact", - "location" : "https://artifacts.tools.arm.com/vcpkg-registry" - } ], - "requires" : { - "arm:tools/open-cmsis-pack/cmsis-toolbox" : "^2.14.1", - "arm:tools/kitware/cmake" : "^4.3.3", - "arm:tools/ninja-build/ninja" : "^1.13.2", - "arm:compilers/arm/armclang" : "^6.24.0", - "arm:models/arm/avh-fvp" : "^11.32.23" - } -} +{ + "registries": [ + { + "name": "arm", + "kind": "artifact", + "location": "https://artifacts.tools.arm.com/vcpkg-registry" + } + ], + "requires": { + "arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.15.0", + "arm:compilers/arm/armclang": "^6.24.0", + "arm:models/arm/avh-fvp": "^11.32.23", + "arm:compilers/arm/arm-none-eabi-gcc": "^15.3.2", + "arm:tools/kitware/cmake": "^4.3.3", + "arm:compilers/arm/llvm-embedded": "^23.1.0", + "arm:tools/ninja-build/ninja": "^1.13.2" + } +}