diff --git a/.github/workflows/build.yml b/.github/workflows/Build.yml similarity index 51% rename from .github/workflows/build.yml rename to .github/workflows/Build.yml index b313ed9..b6eb1b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/Build.yml @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright 2022-2025 Arm Limited and/or its -# affiliates +# 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"); @@ -14,75 +14,71 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Build contexts +name: Build on: - workflow_dispatch: - #pull_request: - # branches: [main] + pull_request: + branches: [main] push: branches: [main] - - #schedule: - # - cron: '00 20 * * 6' - + # schedule: + # - cron: '00 20 * * 6' jobs: CI: strategy: + fail-fast: false matrix: context: [ # toolchain, example directory, project name, build-type, target-type, artifact name, - { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: AC6_DbgPl_AppKit-E8-U85 }, - { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: AC6_DbgRec_AppKit-E8-U85 }, - { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: AC6_RelPl_AppKit-E8-U85 }, - { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: AC6_RelRec_AppKit-E8-U85 } - # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: GCC_DbgPl_AppKit-E8-U85 }, - # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: GCC_DbgRec_AppKit-E8-U85 }, - # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: GCC_RelPl_AppKit-E8-U85 }, - # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: GCC_RelRec_AppKit-E8-U85 } - # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: IAR_DbgPl_AppKit-E8-U85 }, - # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: IAR_DbgRec_AppKit-E8-U85 }, - # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: IAR_RelPl_AppKit-E8-U85 }, - # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: IAR_RelRec_AppKit-E8-U85 } - ] + { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: AC6_DebugPlay_AppKit-E8-U85 }, + { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: AC6_DebugRec_AppKit-E8-U85 }, + { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: AC6_ReleasePlay_AppKit-E8-U85 }, + { tool: AC6, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: AC6_ReleaseRec_AppKit-E8-U85 }, + # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: GCC_DebugPlay_AppKit-E8-U85 }, + # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: GCC_DebugRec_AppKit-E8-U85 }, + # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: GCC_ReleasePlay_AppKit-E8-U85 }, + # { tool: GCC, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: GCC_ReleaseRec_AppKit-E8-U85 }, + # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugPlay, target-type: AppKit-E8-U85, artf_name: IAR_DebugPlay_AppKit-E8-U85 }, + # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: DebugRec, target-type: AppKit-E8-U85, artf_name: IAR_DebugRec_AppKit-E8-U85 }, + # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleasePlay, target-type: AppKit-E8-U85, artf_name: IAR_ReleasePlay_AppKit-E8-U85 }, + # { tool: IAR, dir: ./RockPaperScissors/AppKit-E8_USB, proj: AlgorithmTest, build-type: ReleaseRec, target-type: AppKit-E8-U85, artf_name: IAR_ReleaseRec_AppKit-E8-U85 } + ] - fail-fast: false - runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v6 + - name: Checkout repository + uses: actions/checkout@v6 - - name: Activate vcpkg - uses: ARM-software/cmsis-actions/vcpkg@v1 - with: - config: "./vcpkg-configuration.json" - cache: "ModelNova" + - name: Activate vcpkg + uses: ARM-software/cmsis-actions/vcpkg@v1 + with: + config: "./vcpkg-configuration.json" + cache: "ModelNova" - - name: Activate Arm tool license - uses: ARM-software/cmsis-actions/armlm@v1 + - name: Activate Arm tool license + uses: ARM-software/cmsis-actions/armlm@v1 - - name: Initialize CMSIS pack root folder - run: | - cpackget init https://www.keil.com/pack/index.pidx - cpackget update-index + - name: Initialize CMSIS pack root folder + run: | + cpackget init https://www.keil.com/pack/index.pidx + cpackget update-index - - name: Cache downloaded packs - uses: actions/cache@v5 - with: - key: ModelNova - path: /home/runner/.cache/arm/packs/.Download + - name: Cache downloaded packs + uses: actions/cache@v5 + with: + key: ModelNova + path: /home/runner/.cache/arm/packs/.Download - - name: ${{matrix.context.tool}} Build-Test for context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} - working-directory: ${{matrix.context.dir}} - run: | - cbuild SDS.csolution.yml --context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} --toolchain ${{matrix.context.tool}} --packs + - name: ${{matrix.context.tool}} Build-Test for context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} + working-directory: ${{matrix.context.dir}} + run: | + cbuild SDS.csolution.yml --context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} --toolchain ${{matrix.context.tool}} --packs - - name: Upload output for context ${{matrix.context.tool}} ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} - uses: actions/upload-artifact@v7 - with: - name: ${{matrix.context.tool}}_build_${{matrix.context.artf_name}} - path: ${{matrix.context.dir}}/out/${{matrix.context.proj}}/${{matrix.context.target-type}} - include-hidden-files: true + - name: Upload ${{matrix.context.tool}} output for context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}} + uses: actions/upload-artifact@v7 + with: + name: ${{matrix.context.artf_name}} + path: ${{matrix.context.dir}}/out/${{matrix.context.proj}}/${{matrix.context.target-type}} + include-hidden-files: true diff --git a/.github/workflows/Build_RPS_AppKit-E8.yml b/.github/workflows/Build_RPS_AppKit-E8.yml new file mode 100644 index 0000000..41c464f --- /dev/null +++ b/.github/workflows/Build_RPS_AppKit-E8.yml @@ -0,0 +1,63 @@ +# 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 RockPaperScissors AppKit-E8 +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + CI: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Activate vcpkg + uses: ARM-software/cmsis-actions/vcpkg@v1 + with: + config: "./vcpkg-configuration.json" + cache: "ModelNova" + + - name: Activate Arm tool license + uses: ARM-software/cmsis-actions/armlm@v1 + + - name: Initialize CMSIS pack root folder + run: | + cpackget init https://www.keil.com/pack/index.pidx + cpackget update-index + + - name: Cache downloaded packs + uses: actions/cache@v5 + with: + key: ModelNova + path: /home/runner/.cache/arm/packs/.Download + + - name: Build the target-set + working-directory: ./RockPaperScissors/AppKit-E8_USB + run: | + cbuild SDS.csolution.yml --active AppKit-E8-U85@HIL --packs + + - name: Upload output of the built target-set + uses: actions/upload-artifact@v7 + with: + name: RPS_AppKit-E8-U85_HIL + path: | + ./RockPaperScissors/AppKit-E8_USB/out diff --git a/.github/workflows/HIL_RPS_AppKit-E8.yml b/.github/workflows/HIL_RPS_AppKit-E8.yml new file mode 100644 index 0000000..9e8e250 --- /dev/null +++ b/.github/workflows/HIL_RPS_AppKit-E8.yml @@ -0,0 +1,67 @@ +# 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: HIL RockPaperScissors AppKit-E8 +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + CI: + runs-on: [self-hosted, rsp-p5-01] + + steps: + - name: Start the SDSIO server on the Raspberry Pi + run: | + if ! pgrep -f "sdsio-server.py usb" > /dev/null; then + nohup python ~/SDS-Framework/utilities/sdsio-server.py usb > ~/SDS-Framework/utilities/sdsio-server.log 2>&1 & + sleep 2 + fi + pgrep -f "sdsio-server.py usb" + tail -n 20 ~/SDS-Framework/utilities/sdsio-server.log || true + + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Download Build Artifact + uses: dawidd6/action-download-artifact@v17 + with: + workflow: Build_RPS_AppKit-E8.yml + name: RPS_AppKit-E8-U85_HIL + path: ./RockPaperScissors/AppKit-E8_USB/out + + - name: Flash and run using pyOCD + working-directory: ./RockPaperScissors/AppKit-E8_USB/out + run: | + pyocd load --uid L96807771A --cbuild-run SDS+AppKit-E8-U85.cbuild-run.yml + pyocd run --uid L96807771A --cbuild-run SDS+AppKit-E8-U85.cbuild-run.yml -O reset_type=hardware --timelimit 10 + + - name: Stop the SDSIO server on the Raspberry Pi + run: | + PIDS=$(pgrep -f "sdsio-server.py usb") || true + if [ -n "$PIDS" ]; then + echo "Stopping SDSIO server (PIDs: $PIDS)" + kill $PIDS + else + echo "No SDSIO server running" + fi + + - name: Show content of the sdsio-server.log file + run: | + cat ~/SDS-Framework/utilities/sdsio-server.log diff --git a/.github/workflows/build_target_set.yml b/.github/workflows/build_target_set.yml deleted file mode 100644 index 75958a5..0000000 --- a/.github/workflows/build_target_set.yml +++ /dev/null @@ -1,67 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2022-2025 Arm Limited and/or its -# affiliates -# 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 DebugRec AC6 -on: - - workflow_dispatch: - #pull_request: - # branches: [main] - push: - branches: [main] - - #schedule: - # - cron: '00 20 * * 6' - -jobs: - CI: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Activate vcpkg - uses: ARM-software/cmsis-actions/vcpkg@v1 - with: - config: "./vcpkg-configuration.json" - cache: "ModelNova" - - - name: Activate Arm tool license - uses: ARM-software/cmsis-actions/armlm@v1 - - - name: Initialize CMSIS pack root folder - run: | - cpackget init https://www.keil.com/pack/index.pidx - cpackget update-index - - - name: Cache downloaded packs - uses: actions/cache@v5 - with: - key: ModelNova - path: /home/runner/.cache/arm/packs/.Download - - - name: Build for target-set for ULinkPlus with AC6 Compiler - working-directory: ./RockPaperScissors/AppKit-E8_USB - run: | - cbuild SDS.csolution.yml --active AppKit-E8-U85@TS_ULP --packs - - - name: Upload output for target set AppKit-E8-U85@TS_ULP - uses: actions/upload-artifact@v7 - with: - name: DebugPlay_AC6_ULPlus - path: | - ./RockPaperScissors/AppKit-E8_USB/out diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml deleted file mode 100644 index 87019d0..0000000 --- a/.github/workflows/run.yml +++ /dev/null @@ -1,40 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2022-2025 Arm Limited and/or its -# affiliates -# 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: Run DebugRec AC6 -on: - - workflow_dispatch: - -jobs: - CI: - runs-on: [self-hosted, rsp-p5-01] - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Download Build Artifact - uses: dawidd6/action-download-artifact@v17 - with: - workflow: build_target_set.yml - name: DebugPlay_AC6_ULPlus - path: ./RockPaperScissors/AppKit-E8_USB/out - - - name: Flash and run DebugPlay_AC6_ULPlus - working-directory: ./RockPaperScissors/AppKit-E8_USB/out - run: | - pyocd load --uid L96807771A --cbuild-run SDS+AppKit-E8-U85.cbuild-run.yml diff --git a/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml b/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml index 517b013..c99efae 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml @@ -28,7 +28,7 @@ solution: - SDSIO-Layer: $SolutionDir()$/sdsio/usb/sdsio_usb.clayer.yml - AI-Layer: $SolutionDir()$/ai_layer/ai_layer.clayer.yml target-set: - - set: TS_JLink + - set: J-Link debugger: name: J-Link Server clock: 4000000 @@ -36,7 +36,7 @@ solution: start-pname: M55_HP images: - project-context: AlgorithmTest.DebugRec - - set: TS_ULP + - set: HIL debugger: name: ULINKplus@pyOCD clock: 10000000 @@ -46,7 +46,7 @@ solution: - pname: M55_HP mode: console images: - - project-context: AlgorithmTest.DebugRec + - project-context: AlgorithmTest.DebugPlay # List of different build configurations. build-types: