[Actions] New workflow runs in a PR should cancel any in-progress one… #512
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: Build ThunderNanoServicesRDK on Windows | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| env: | |
| deviceInfo: ThunderNanoServicesRDK\DeviceInfo\DeviceInfo.vcxproj | |
| locationSync: ThunderNanoServicesRDK\LocationSync\LocationSync.vcxproj | |
| messageControl: ThunderNanoServicesRDK\MessageControl\MessageControl.vcxproj | |
| messenger: ThunderNanoServicesRDK\Messenger\Messenger.vcxproj | |
| monitor: ThunderNanoServicesRDK\Monitor\Monitor.vcxproj | |
| openCDMi: ThunderNanoServicesRDK\OpenCDMi\OpenCDMi.vcxproj | |
| securityAgent: ThunderNanoServicesRDK\SecurityAgent\SecurityAgent.vcxproj | |
| solution: Thunder.sln | |
| jobs: | |
| ThunderNanoServices: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| type: [Debug, Release] | |
| version: [64, 86] | |
| # ----- Checkout ----- | |
| name: Build type - ${{matrix.type}}${{matrix.version}} | |
| steps: | |
| - name: Checkout ThunderOnWindows | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows | |
| repository: WebPlatformForEmbedded/ThunderOnWindows | |
| - name: Checkout Thunder | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/Thunder | |
| repository: rdkcentral/Thunder | |
| - name: Checkout ThunderTools | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/ThunderTools | |
| repository: rdkcentral/ThunderTools | |
| - name: Checkout ThunderClientLibraries | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/ThunderClientLibraries | |
| repository: rdkcentral/ThunderClientLibraries | |
| - name: Checkout ThunderInterfaces | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/ThunderInterfaces | |
| repository: rdkcentral/ThunderInterfaces | |
| - name: Checkout ThunderNanoServices | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/ThunderNanoServices | |
| repository: rdkcentral/ThunderNanoServices | |
| - name: Checkout ThunderNanoServicesRDK | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ThunderOnWindows/ThunderNanoServicesRDK | |
| repository: WebPlatformForEmbedded/ThunderNanoServicesRDK | |
| # ----- Install, build & upload artifacts ----- | |
| - name: Install jsonref | |
| run: pip install jsonref | |
| - name: Build ThunderNanoServicesRDK | |
| shell: cmd | |
| run: | | |
| for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.CoreEditor -property productPath`) do set "VS_PATH=%%i" | |
| if not defined VS_PATH (echo ERROR: Visual Studio not found && exit /b 1) | |
| set "devEnv=%VS_PATH:.exe=.com%" | |
| cd ThunderOnWindows | |
| for %%P in ( | |
| "%deviceInfo%" "%locationSync%" "%messageControl%" | |
| "%messenger%" "%monitor%" "%openCDMi%" "%securityAgent%" | |
| ) do ( | |
| "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project %%P "%solution%" | |
| if errorlevel 1 exit /b 1 | |
| ) | |
| - name: Tar files | |
| run: tar -czvf ${{matrix.type}}${{matrix.version}}.tar.gz artifacts | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ThunderNanoServicesRDK-${{matrix.type}}${{matrix.version}}-artifact | |
| path: ${{matrix.type}}${{matrix.version}}.tar.gz |