From bd448375493b1c9a9c7db8150ead37a95bd41f52 Mon Sep 17 00:00:00 2001 From: VeithMetro <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 21 Feb 2023 13:39:58 +0100 Subject: [PATCH] [Actions] Creating GitHub actions to build ThunderInterfaces on Windows (#232) * Update and rename Build ThunderInterfaces.yml to Build ThunderInterfaces on Linux.yml * Create Build ThunderInterfaces on Windows.yml * Updating artifacts paths * Updating checkout and output paths * Changing project and solution paths Apparently devenv can't open solution if not run from the very same folder.. * Prepare for PR and merge * Optimizing runtime no outside actions necessary * More name changes --- ...l => Build ThunderInterfaces on Linux.yml} | 4 +- .../Build ThunderInterfaces on Windows.yml | 85 +++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) rename .github/workflows/{Build ThunderInterfaces.yml => Build ThunderInterfaces on Linux.yml} (97%) create mode 100644 .github/workflows/Build ThunderInterfaces on Windows.yml diff --git a/.github/workflows/Build ThunderInterfaces.yml b/.github/workflows/Build ThunderInterfaces on Linux.yml similarity index 97% rename from .github/workflows/Build ThunderInterfaces.yml rename to .github/workflows/Build ThunderInterfaces on Linux.yml index dc7a0237..12fed0a2 100644 --- a/.github/workflows/Build ThunderInterfaces.yml +++ b/.github/workflows/Build ThunderInterfaces on Linux.yml @@ -1,4 +1,4 @@ -name: CMake ThunderInterfaces +name: Build ThunderInterfaces on Linux on: push: @@ -11,7 +11,7 @@ jobs: Thunder: uses: rdkcentral/Thunder/.github/workflows/Build Thunder on Linux.yml@master - Interfaces: + ThunderInterfaces: needs: Thunder runs-on: ubuntu-latest diff --git a/.github/workflows/Build ThunderInterfaces on Windows.yml b/.github/workflows/Build ThunderInterfaces on Windows.yml new file mode 100644 index 00000000..255cf202 --- /dev/null +++ b/.github/workflows/Build ThunderInterfaces on Windows.yml @@ -0,0 +1,85 @@ +name: Build ThunderInterfaces on Windows + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +env: + definitions: ThunderInterfaces\definitions\definitions.vcxproj + devEnv: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com + interfaces: ThunderInterfaces\interfaces\Interfaces.vcxproj + solution: Thunder.sln + +jobs: + ThunderInterfaces: + runs-on: windows-latest + + strategy: + matrix: + type: [Debug, Release] + version: [64, 86] + + name: Build type - ${{matrix.type}}${{matrix.version}} + steps: + - name: Checkout ThunderOnWindows + uses: actions/checkout@v3 + with: + path: ThunderOnWindows + repository: WebPlatformForEmbedded/ThunderOnWindows + + - name: Checkout Thunder + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/Thunder + repository: ${{github.repository_owner}}/Thunder + + - name: Checkout ThunderTools + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/ThunderTools + repository: ${{github.repository_owner}}/ThunderTools + + - name: Checkout ThunderClientLibraries + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/ThunderClientLibraries + repository: ${{github.repository_owner}}/ThunderClientLibraries + + - name: Checkout ThunderInterfaces + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/ThunderInterfaces + repository: ${{github.repository_owner}}/ThunderInterfaces + + - name: Checkout ThunderNanoServices + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/ThunderNanoServices + repository: ${{github.repository_owner}}/ThunderNanoServices + + - name: Checkout ThunderNanoServicesRDK + uses: actions/checkout@v3 + with: + path: ThunderOnWindows/ThunderNanoServicesRDK + repository: WebPlatformForEmbedded/ThunderNanoServicesRDK + + - name: Install jsonref + run: pip install jsonref + + - name: Build ThunderInterfaces + shell: cmd + run: | + cd ThunderOnWindows + "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%definitions%" "%solution%" + "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%interfaces%" "%solution%" + + - name: Tar files + run: tar -czvf ${{matrix.type}}${{matrix.version}}.tar.gz artifacts + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: ThunderInterfaces-${{matrix.type}}${{matrix.version}}-artifact + path: ${{matrix.type}}${{matrix.version}}.tar.gz