Skip to content

Build ThunderClientLibraries on Windows #298

Build ThunderClientLibraries on Windows

Build ThunderClientLibraries on Windows #298

name: Build ThunderClientLibraries on Windows
on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
cryptography: ThunderClientLibraries\Source\cryptography\Cryptography.vcxproj
devEnv: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com
deviceinfo: ThunderClientLibraries\Source\deviceinfo\DeviceInfo.vcxproj
displayinfo: ThunderClientLibraries\Source\displayinfo\displayinfo.vcxproj
ocdm: ThunderClientLibraries\Source\ocdm\ocdm.vcxproj
securityagent: ThunderClientLibraries\Source\securityagent\securityagent.vcxproj
solution: Thunder.sln
virtualinput: ThunderClientLibraries\Source\virtualinput\virtualinput.vcxproj
jobs:
ThunderClientLibraries:
runs-on: windows-latest
strategy:
matrix:
type: [Debug, Release]
version: [64, 86]
# ----- Checkouts & Regex -----
name: Build type - ${{matrix.type}}${{matrix.version}}
steps:
- name: Checkout ThunderOnWindows
uses: actions/checkout@v4
with:
path: ThunderOnWindows
repository: WebPlatformForEmbedded/ThunderOnWindows
# ----- Thunder -----
- name: Checkout Thunder - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=Thunder:') }}
uses: actions/checkout@v4
with:
path: ThunderOnWindows/Thunder
repository: ${{github.repository_owner}}/Thunder
- name: Regex Thunder
if: contains(github.event.pull_request.body, '[DependsOn=Thunder:')
id: thunder
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[DependsOn=Thunder:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Checkout Thunder - ${{steps.thunder.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=Thunder:')
uses: actions/checkout@v4
with:
path: ThunderOnWindows/Thunder
repository: ${{github.repository_owner}}/Thunder
ref: ${{steps.thunder.outputs.first_match}}
# ----- ThunderTools -----
- name: Checkout ThunderTools - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderTools:') }}
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderTools
repository: ${{github.repository_owner}}/ThunderTools
- name: Regex ThunderTools
if: contains(github.event.pull_request.body, '[DependsOn=ThunderTools:')
id: tools
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[DependsOn=ThunderTools:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Checkout ThunderTools - ${{steps.tools.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=ThunderTools:')
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderTools
repository: ${{github.repository_owner}}/ThunderTools
ref: ${{steps.tools.outputs.first_match}}
# ----- Other checkouts -----
- name: Checkout ThunderClientLibraries
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderClientLibraries
repository: ${{github.repository_owner}}/ThunderClientLibraries
- name: Checkout ThunderInterfaces
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderInterfaces
repository: ${{github.repository_owner}}/ThunderInterfaces
- name: Checkout ThunderNanoServices
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServices
repository: ${{github.repository_owner}}/ThunderNanoServices
- name: Checkout ThunderNanoServicesRDK
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServicesRDK
repository: WebPlatformForEmbedded/ThunderNanoServicesRDK
# ----- Building & uploading artifacts -----
- name: Install jsonref
run: pip install jsonref
- name: Build ThunderClientLibraries
shell: cmd
run: >
cd ThunderOnWindows
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%cryptography%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%deviceinfo%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%displayinfo%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%ocdm%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%securityagent%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%virtualinput%" "%solution%"
- name: Tar files
run: tar -czvf ${{matrix.type}}${{matrix.version}}.tar.gz artifacts
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ThunderClientLibraries-${{matrix.type}}${{matrix.version}}-artifact
path: ${{matrix.type}}${{matrix.version}}.tar.gz