Skip to content

Commit ea3c73e

Browse files
committed
Add GH Actions workflows for testing the examples
1 parent 522f0ad commit ea3c73e

4 files changed

Lines changed: 321 additions & 0 deletions

File tree

.ci/vcpkg-configuration.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"registries": [
3+
{
4+
"name": "arm",
5+
"kind": "artifact",
6+
"location": "https://artifacts.tools.arm.com/vcpkg-registry"
7+
}
8+
],
9+
"requires": {
10+
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.12.0",
11+
"arm:compilers/arm/armclang": "^6.24.0",
12+
"arm:compilers/arm/arm-none-eabi-gcc": "^14.3.1",
13+
"arm:compilers/arm/llvm-embedded": "21.1.1",
14+
"arm:models/arm/avh-fvp": "11.30.29",
15+
"arm:tools/kitware/cmake": "^3.31.5",
16+
"arm:tools/ninja-build/ninja": "^1.13.2"
17+
}
18+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright 2026 Arm Limited and/or its affiliates.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the License); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# 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, WITHOUT
13+
# 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 FVP_Audio Example
18+
on:
19+
20+
workflow_dispatch:
21+
pull_request:
22+
paths:
23+
# Execute workflow when PR modifies this file
24+
- .github/workflows/Build_FVP_Audio.yml
25+
# Execute workflow when PR modifies example directory
26+
- example/FVP_Audio/**
27+
push:
28+
# Execute workflow when main branch is updated
29+
branches: [main]
30+
31+
#schedule:
32+
# - cron: '00 20 * * 6'
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
Build:
40+
strategy:
41+
matrix:
42+
context: [
43+
{proj: FVP_Audio, build_type: Debug, target_type: SSE-300},
44+
{proj: FVP_Audio, build_type: Release, target_type: SSE-300},
45+
46+
{proj: FVP_Audio, build_type: Debug, target_type: SSE-310},
47+
{proj: FVP_Audio, build_type: Release, target_type: SSE-310},
48+
49+
{proj: FVP_Audio, build_type: Debug, target_type: SSE-315},
50+
{proj: FVP_Audio, build_type: Release, target_type: SSE-315},
51+
52+
{proj: FVP_Audio, build_type: Debug, target_type: SSE-320},
53+
{proj: FVP_Audio, build_type: Release, target_type: SSE-320}
54+
]
55+
toolchain: [AC6, GCC, CLANG]
56+
57+
fail-fast: false
58+
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
- name: Checkout current repository
63+
uses: actions/checkout@v6
64+
65+
- name: Install tools
66+
uses: ARM-software/cmsis-actions/vcpkg@v1
67+
with:
68+
config: ".ci/vcpkg-configuration.json"
69+
70+
- name: Activate Arm tool license
71+
uses: ARM-software/cmsis-actions/armlm@v1
72+
73+
- name: Initialize CMSIS pack root folder
74+
run: |
75+
cpackget init https://www.keil.com/pack/index.pidx
76+
cpackget update-index
77+
78+
- name: Add local CMSIS packs
79+
run: |
80+
cpackget add ./ARM.AVH_FVP.pdsc
81+
82+
- name: Build Test
83+
working-directory: ./example/FVP_Audio
84+
run: |
85+
cbuild FVP_Audio.csolution.yml \
86+
--context .${{matrix.context.build_type}}+${{matrix.context.target_type}} \
87+
--toolchain ${{matrix.toolchain}} \
88+
--update-rte --rebuild --packs
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright 2026 Arm Limited and/or its affiliates.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the License); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# 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, WITHOUT
13+
# 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 FVP_Video Example
18+
on:
19+
20+
workflow_dispatch:
21+
pull_request:
22+
paths:
23+
# Execute workflow when PR modifies this file
24+
- .github/workflows/Build_FVP_Video.yml
25+
# Execute workflow when PR modifies example directory
26+
- example/FVP_Video/**
27+
push:
28+
# Execute workflow when main branch is updated
29+
branches: [main]
30+
31+
#schedule:
32+
# - cron: '00 20 * * 6'
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
Build:
40+
strategy:
41+
matrix:
42+
context: [
43+
{proj: FVP_Video, build_type: Debug, target_type: SSE-300},
44+
{proj: FVP_Video, build_type: Release, target_type: SSE-300},
45+
46+
{proj: FVP_Video, build_type: Debug, target_type: SSE-310},
47+
{proj: FVP_Video, build_type: Release, target_type: SSE-310},
48+
49+
{proj: FVP_Video, build_type: Debug, target_type: SSE-315},
50+
{proj: FVP_Video, build_type: Release, target_type: SSE-315},
51+
52+
{proj: FVP_Video, build_type: Debug, target_type: SSE-320},
53+
{proj: FVP_Video, build_type: Release, target_type: SSE-320}
54+
]
55+
toolchain: [AC6, GCC, CLANG]
56+
57+
fail-fast: false
58+
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
- name: Checkout current repository
63+
uses: actions/checkout@v6
64+
65+
- name: Install tools
66+
uses: ARM-software/cmsis-actions/vcpkg@v1
67+
with:
68+
config: ".ci/vcpkg-configuration.json"
69+
70+
- name: Activate Arm tool license
71+
uses: ARM-software/cmsis-actions/armlm@v1
72+
73+
- name: Initialize CMSIS pack root folder
74+
run: |
75+
cpackget init https://www.keil.com/pack/index.pidx
76+
cpackget update-index
77+
78+
- name: Add local CMSIS packs
79+
run: |
80+
cpackget add ./ARM.AVH_FVP.pdsc
81+
82+
- name: Build Test
83+
working-directory: ./example/FVP_Video
84+
run: |
85+
cbuild FVP_Video.csolution.yml \
86+
--context .${{matrix.context.build_type}}+${{matrix.context.target_type}} \
87+
--toolchain ${{matrix.toolchain}} \
88+
--update-rte --rebuild --packs
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Copyright 2026 Arm Limited and/or its affiliates.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the License); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# 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, WITHOUT
13+
# 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 and Run FVP_Hello Example
18+
on:
19+
20+
workflow_dispatch:
21+
pull_request:
22+
paths:
23+
# Execute workflow when PR modifies this file
24+
- .github/workflows/Build_Run_FVP_Hello.yml
25+
# Execute workflow when PR modifies example directory
26+
- example/FVP_Hello/**
27+
push:
28+
# Execute workflow when main branch is updated
29+
branches: [main]
30+
31+
#schedule:
32+
# - cron: '00 20 * * 6'
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
Build_Run:
40+
strategy:
41+
matrix:
42+
context: [
43+
{proj: FVP_Hello, build_type: Debug, target_type: SSE-300, model: FVP_Corstone_SSE-300, layer: Corstone-300, mps: mps3},
44+
{proj: FVP_Hello, build_type: Release, target_type: SSE-300, model: FVP_Corstone_SSE-300, layer: Corstone-300, mps: mps3},
45+
46+
{proj: FVP_Hello, build_type: Debug, target_type: SSE-310, model: FVP_Corstone_SSE-310, layer: Corstone-310, mps: mps3},
47+
{proj: FVP_Hello, build_type: Release, target_type: SSE-310, model: FVP_Corstone_SSE-310, layer: Corstone-310, mps: mps3},
48+
49+
{proj: FVP_Hello, build_type: Debug, target_type: SSE-315, model: FVP_Corstone_SSE-315, layer: Corstone-315, mps: mps4},
50+
{proj: FVP_Hello, build_type: Release, target_type: SSE-315, model: FVP_Corstone_SSE-315, layer: Corstone-315, mps: mps4},
51+
52+
{proj: FVP_Hello, build_type: Debug, target_type: SSE-320, model: FVP_Corstone_SSE-320, layer: Corstone-320, mps: mps4},
53+
{proj: FVP_Hello, build_type: Release, target_type: SSE-320, model: FVP_Corstone_SSE-320, layer: Corstone-320, mps: mps4}
54+
]
55+
toolchain: [
56+
{name: AC6, ext: axf},
57+
{name: GCC, ext: elf},
58+
{name: CLANG, ext: elf}
59+
]
60+
61+
fail-fast: false
62+
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- name: Checkout current repository
67+
uses: actions/checkout@v6
68+
69+
- name: Install tools
70+
uses: ARM-software/cmsis-actions/vcpkg@v1
71+
with:
72+
config: ".ci/vcpkg-configuration.json"
73+
74+
- name: Activate Arm tool license
75+
uses: ARM-software/cmsis-actions/armlm@v1
76+
77+
- name: Initialize CMSIS pack root folder
78+
run: |
79+
cpackget init https://www.keil.com/pack/index.pidx
80+
cpackget update-index
81+
82+
- name: Add local CMSIS packs
83+
run: |
84+
cpackget add ./ARM.AVH_FVP.pdsc
85+
86+
- name: Build example
87+
working-directory: ./example/FVP_Hello
88+
run: |
89+
cbuild FVP_Hello.csolution.yml \
90+
--context .${{matrix.context.build_type}}+${{matrix.context.target_type}} \
91+
--toolchain ${{matrix.toolchain.name}} \
92+
--update-rte --rebuild --packs
93+
94+
- name: Execute example
95+
working-directory: ./example/FVP_Hello
96+
run: |
97+
${{ matrix.context.model }} \
98+
-a ./out/${{matrix.context.proj}}/${{matrix.context.target_type}}/${{matrix.context.build_type}}/${{matrix.context.proj}}.${{matrix.toolchain.ext}} \
99+
-f ./board/${{matrix.context.layer}}/fvp_config.txt \
100+
-C ${{matrix.context.mps}}_board.uart0.out_file=${{matrix.context.proj}}_${{matrix.context.build_type}}_${{matrix.context.target_type}}_${{matrix.toolchain.name}}.log \
101+
--simlimit 30
102+
103+
- name: Show example output
104+
working-directory: ./example/FVP_Hello
105+
run: |
106+
echo "FVP UART output:"
107+
cat ${{matrix.context.proj}}_${{matrix.context.build_type}}_${{matrix.context.target_type}}_${{matrix.toolchain.name}}.log
108+
109+
- name: Check example output
110+
# Disable SSE-320 output check due to known issue with FVP UART output
111+
if: matrix.context.target_type != 'SSE-320'
112+
working-directory: ./example/FVP_Hello
113+
run: |
114+
echo "Check FVP UART output:"
115+
COUNT=$(grep "Hello World" ${{matrix.context.proj}}_${{matrix.context.build_type}}_${{matrix.context.target_type}}_${{matrix.toolchain.name}}.log | wc -l)
116+
if [ "$COUNT" -eq 10 ]; then
117+
echo "Passed"
118+
else
119+
echo "Failed"
120+
exit 1
121+
fi
122+
123+
- name: Upload FVP UART output log
124+
uses: actions/upload-artifact@v6
125+
with:
126+
name: ${{matrix.context.proj}}_${{matrix.context.build_type}}_${{matrix.context.target_type}}_${{matrix.toolchain.name}}.log
127+
path: ./example/FVP_Hello/${{matrix.context.proj}}_${{matrix.context.build_type}}_${{matrix.context.target_type}}_${{matrix.toolchain.name}}.log

0 commit comments

Comments
 (0)