22name : Continuous Integration
33
44on :
5- push :
6- branches : [main]
7- pull_request :
8- types : [opened, synchronize, reopened]
5+ workflow_call :
6+ inputs :
7+ target :
8+ description : " Target"
9+ required : true
10+ type : string
11+ configuration :
12+ description : " Configuration"
13+ required : true
14+ type : string
915
10- permissions :
11- contents : read
12-
13- concurrency :
14- group : ${{ github.ref }}-${{ github.workflow }}
15- cancel-in-progress : true
16+ permissions : {}
1617
1718jobs :
1819 build :
1920 name : Build
20- strategy :
21- matrix :
22- target : ["host", "stm32f407", "windows"]
23- configuration : ["RelWithDebInfo"]
2421 runs-on : [ubuntu-latest]
2522 container : ghcr.io/philips-software/amp-devcontainer-cpp:v6.0.2@sha256:36afaaa5ba4bc4e9bb471012db9733c26a210e315ddb33600f73bb9532b02a25 # 6.0.2
2623 steps :
@@ -29,26 +26,26 @@ jobs:
2926 disable-sudo-and-containers : true
3027 egress-policy : audit
3128 - uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
32- if : ${{ matrix .target == 'windows' }}
29+ if : ${{ inputs .target == 'windows' }}
3330 id : cache-winsdk
3431 with :
3532 path : /winsdk
3633 key : cache-winsdk
37- - if : ${{ matrix .target == 'windows' && steps.cache-winsdk.outputs.cache-hit != 'true' }}
34+ - if : ${{ inputs .target == 'windows' && steps.cache-winsdk.outputs.cache-hit != 'true' }}
3835 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
3936 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4037 with :
4138 persist-credentials : false
4239 submodules : true
4340 - uses : hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1.2.18
4441 with :
45- key : ${{ matrix .target}}-${{ matrix .configuration }}
42+ key : ${{ inputs .target}}-${{ inputs .configuration }}
4643 - uses : lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8
4744 with :
48- configurePreset : " ${{ matrix .target }}"
49- buildPreset : " ${{ matrix .target }}-${{ matrix .configuration }}"
45+ configurePreset : " ${{ inputs .target }}"
46+ buildPreset : " ${{ inputs .target }}-${{ inputs .configuration }}"
5047 configurePresetAdditionalArgs : " ['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
51- - if : ${{ matrix .target == 'windows' }}
48+ - if : ${{ inputs .target == 'windows' }}
5249 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5350 with :
5451 name : WindowsDiscovery
0 commit comments