chore: update amp-embedded-infra-lib hash to 74c80eeb311a7da2870aec8587393c0dcac90149 #3164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| host_build_test_ubuntu: | |
| name: Host Build & Test (ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: hendrikmuhs/ccache-action@1bbbcda0748b3e340dee71a314fa68ffcbd6df79 # v1.2.21 | |
| with: | |
| key: ${{ github.job }}-ubuntu-latest | |
| - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 | |
| - uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8 | |
| with: | |
| configurePreset: "host" | |
| buildPreset: "host-Debug-WithPackage" | |
| testPreset: "host" | |
| configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']" | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: hal_st | |
| path: build/host/hal_st-*-Linux.tar.gz | |
| if-no-files-found: error | |
| - name: Upload test logs | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: test-logs | |
| path: build/host/Testing/Temporary/ | |
| host_build_test: | |
| name: Host Build & Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: hendrikmuhs/ccache-action@1bbbcda0748b3e340dee71a314fa68ffcbd6df79 # v1.2.21 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os }} | |
| - uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8 | |
| with: | |
| configurePreset: "host-single-Debug" | |
| buildPreset: "host-single-Debug" | |
| testPreset: "host-single-Debug" | |
| configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']" | |
| - name: Upload test logs | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: test-logs | |
| path: build/host/Testing/Temporary/ | |
| host_build_clang_msvc: | |
| name: Windows Host Build from Devcontainer | |
| runs-on: [ubuntu-latest] | |
| container: ghcr.io/philips-software/amp-devcontainer-cpp:v6.6.4@sha256:0d6b572f5c589def3efb245844528ef44903c9927149da9bcec21feab36388b9 # v6.6.4 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| id: cache-winsdk | |
| with: | |
| path: /winsdk | |
| key: cache-winsdk-10.0.26100-14.43.17.13 | |
| - if: ${{ steps.cache-winsdk.outputs.cache-hit != 'true' }} | |
| run: xwin --accept-license --sdk-version "10.0.26100" --crt-version "14.43.17.13" splat --preserve-ms-arch-notation --include-debug-libs && mv .xwin-cache/splat/ /winsdk | |
| - uses: hendrikmuhs/ccache-action@1bbbcda0748b3e340dee71a314fa68ffcbd6df79 # v1.2.21 | |
| with: | |
| key: ${{ github.job }} | |
| - uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8 | |
| with: | |
| configurePreset: "Windows" | |
| buildPreset: "Windows-Release" | |
| configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']" | |
| embedded_build: | |
| name: Embedded Build | |
| runs-on: ubuntu-latest | |
| needs: [host_build_test_ubuntu] | |
| strategy: | |
| matrix: | |
| configuration: ["RelWithDebInfo"] | |
| gcc: ["10.3-2021.10"] | |
| target: | |
| [ | |
| "stm32wb55", | |
| "stm32wba52", | |
| "stm32wba65", | |
| "stm32g070", | |
| "stm32g071", | |
| "stm32g431", | |
| "stm32f407", | |
| "stm32f429", | |
| "stm32f746", | |
| "stm32f767", | |
| "stm32h563", | |
| "stm32h573" | |
| ] | |
| include: | |
| - gcc: "8-2019-q3" | |
| configuration: "RelWithDebInfo" | |
| target: "stm32f767" | |
| - gcc: "9-2020-q2" | |
| configuration: "RelWithDebInfo" | |
| target: "stm32f767" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install GNU Arm Embedded Toolchain ${{ matrix.gcc }} | |
| uses: carlosperate/arm-none-eabi-gcc-action@2ca034649a66909ef5382c90ffb5d26711d2f266 # v1.12.0 | |
| with: | |
| release: ${{ matrix.gcc }} | |
| - run: sudo apt-get update && sudo apt-get install ninja-build xsltproc | |
| - uses: hendrikmuhs/ccache-action@1bbbcda0748b3e340dee71a314fa68ffcbd6df79 # v1.2.21 | |
| with: | |
| key: ${{ matrix.gcc }}-${{ matrix.configuration }}-${{ matrix.target }} | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hal_st | |
| - run: tar -zxvf hal_st-*.tar.gz | |
| - run: mkdir install && mv hal_st-*/* install/ | |
| - uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8 | |
| with: | |
| configurePreset: ${{ matrix.target }} | |
| buildPreset: ${{ matrix.target }}-${{ matrix.configuration }} | |
| configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']" | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| if: ${{ contains(matrix.target, 'stm32f767') && contains(matrix.gcc, '10.3-2021.10') }} | |
| with: | |
| name: hal_st_tester | |
| path: build/stm32f767/integration_test/tester/RelWithDebInfo/integration_test.tester.bin | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| if: ${{ contains(matrix.target, 'stm32f767') && contains(matrix.gcc, '10.3-2021.10') }} | |
| with: | |
| name: hal_st_tested_stm32f767 | |
| path: build/stm32f767/integration_test/tested/RelWithDebInfo/integration_test.tested.bin | |
| integration_test: | |
| name: Integration test | |
| runs-on: ubuntu-latest | |
| needs: [embedded_build, host_build_test_ubuntu] | |
| permissions: | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hal_st | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hal_st_tester | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hal_st_tested_stm32f767 | |
| - run: ls | |
| - name: Start flex container | |
| run: docker run -d --name flex_container -v "$(pwd)":/external -p 1234:1234/tcp -p 1235:1235/tcp ghcr.io/philips-software/amp-postmaster-flex:v0.2.0 ${{ vars.ENV_POSTMASTER_IP }} /external/integration_test.tester.bin | |
| - run: docker logs flex_container | |
| - run: while [[ "$(docker inspect flex_container | python -c 'import json,sys;print(json.load(sys.stdin)[0]["State"]["Health"]["Status"])')" != "healthy" ]] ; do docker inspect flex_container | python -c 'import json,sys;print(json.load(sys.stdin)[0]["State"]["Health"]["Status"])'; sleep 1; done | |
| timeout-minutes: 2 | |
| - run: docker inspect flex_container | |
| - run: tar -zxvf hal_st-*-Linux.tar.gz | |
| - run: mkdir install | |
| - run: mv hal_st-*-Linux/* install/ | |
| - run: ls install/bin | |
| - run: install/bin/integration_test.flasher tcp://localhost:1234/target/echo/programmer integration_test.tested.bin | |
| - run: install/bin/integration_test.runner run --feature integration_test/runner/features --report console --target tcp://localhost:1234/target/echo/programmer | |
| - if: always() | |
| run: docker logs flex_container | |
| - name: Remove flex container | |
| if: always() | |
| run: docker rm -f flex_container |