|
| 1 | +# Copyright (c) 2026 Arm Limited (or its affiliates). All rights reserved. |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +name: Build examples with GCC |
| 18 | +on: |
| 19 | + workflow_dispatch: |
| 20 | + pull_request: |
| 21 | + branches: [main] |
| 22 | + push: |
| 23 | + branches: [main] |
| 24 | + |
| 25 | +jobs: |
| 26 | + CI: |
| 27 | + runs-on: ubuntu-24.04 |
| 28 | + |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + config: |
| 33 | + [ # example directory, project, build-type, target-type, toolchain |
| 34 | + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, |
| 35 | + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: AppKit-E7-U55, toolchain: GCC }, |
| 36 | + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, |
| 37 | + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, |
| 38 | + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: SSE-300-U55, toolchain: GCC }, |
| 39 | + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, |
| 40 | + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, |
| 41 | + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: DevKit-E8-U85, toolchain: GCC }, |
| 42 | + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, |
| 43 | + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC }, |
| 44 | + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: SSE-320-U85, toolchain: GCC }, |
| 45 | + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC } |
| 46 | + ] |
| 47 | + |
| 48 | + steps: |
| 49 | + - name: Checkout this repository |
| 50 | + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 51 | + |
| 52 | + - name: Install vcpkg |
| 53 | + uses: ARM-software/cmsis-actions/setup-vcpkg@v1 |
| 54 | + with: |
| 55 | + version: 2026.04.27 |
| 56 | + |
| 57 | + - name: Install required tools |
| 58 | + uses: ARM-software/cmsis-actions/vcpkg@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 |
| 59 | + with: |
| 60 | + config: "./vcpkg-configuration.json" |
| 61 | + cache: "Tools" |
| 62 | + |
| 63 | + - name: Activate Arm tool license |
| 64 | + uses: ARM-software/cmsis-actions/armlm@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 |
| 65 | + |
| 66 | + - name: Initialize CMSIS pack root folder |
| 67 | + run: | |
| 68 | + cpackget init https://www.keil.com/pack/index.pidx |
| 69 | + cpackget update-index |
| 70 | +
|
| 71 | + - name: Cache CMSIS packs |
| 72 | + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| 73 | + with: |
| 74 | + key: cmsis-packs-${{ hashFiles('**/*.csolution.yml', '**/*.cproject.yml', '**/*.clayer.yml') }} |
| 75 | + restore-keys: | |
| 76 | + cmsis-packs- |
| 77 | + path: /home/runner/.cache/arm/packs |
| 78 | + |
| 79 | + - 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 |
| 80 | + working-directory: ${{matrix.config.dir}} |
| 81 | + run: | |
| 82 | + cbuild SDS.csolution.yml --context ${{matrix.config.project}}.${{matrix.config.build-type}}+${{matrix.config.target-type}} --toolchain ${{matrix.config.toolchain}} --packs --update-rte |
0 commit comments