Skip to content

Commit

Permalink
[Actions] Updating deprecated actions, removing unnecessary checkouts…
Browse files Browse the repository at this point in the history
…, adding workflow dispatch call (#351)

* Make sure that this workflow will be triggered on a test branch

* Removing the checkout of Thunder since it should no longer be necessary after last changes

* Updating all actions to Node.js 20

* Updating more actions to newest version

* Updating Windows actions to newest version

* Adding workflow_dispatch to be able to trigger the action manually

* Triggering a template from my branch to test it

* Adding branch restriction back and using templates from masters

* Adding branch restriction back for Windows build
  • Loading branch information
VeithMetro authored Jun 6, 2024
1 parent 957c0b5 commit 497cde7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Build ThunderInterfaces on Linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build ThunderInterfaces on Linux

on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/Build ThunderInterfaces on Windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build ThunderInterfaces on Windows

on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
Expand All @@ -23,48 +24,50 @@ jobs:

name: Build type - ${{matrix.type}}${{matrix.version}}
steps:
# ----- Checkout -----
- name: Checkout ThunderOnWindows
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows
repository: WebPlatformForEmbedded/ThunderOnWindows

- name: Checkout Thunder
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/Thunder
repository: ${{github.repository_owner}}/Thunder

- name: Checkout ThunderTools
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderTools
repository: ${{github.repository_owner}}/ThunderTools

- name: Checkout ThunderClientLibraries
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderClientLibraries
repository: ${{github.repository_owner}}/ThunderClientLibraries

- name: Checkout ThunderInterfaces
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderInterfaces
repository: ${{github.repository_owner}}/ThunderInterfaces

- name: Checkout ThunderNanoServices
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServices
repository: ${{github.repository_owner}}/ThunderNanoServices

- name: Checkout ThunderNanoServicesRDK
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServicesRDK
repository: WebPlatformForEmbedded/ThunderNanoServicesRDK

# ----- Building -----
- name: Install jsonref
run: pip install jsonref

Expand All @@ -74,12 +77,13 @@ jobs:
cd ThunderOnWindows
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%definitions%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%interfaces%" "%solution%"
# ----- Articats -----
- name: Tar files
run: tar -czvf ${{matrix.type}}${{matrix.version}}.tar.gz artifacts

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ThunderInterfaces-${{matrix.type}}${{matrix.version}}-artifact
path: ${{matrix.type}}${{matrix.version}}.tar.gz
21 changes: 8 additions & 13 deletions .github/workflows/Linux build template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
matrix:
build_type: [Debug, Release, MinSizeRel]

# ----- Packages & artifacts -----
name: Build type - ${{matrix.build_type}}
steps:
- name: Install necessary packages
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 10
Expand All @@ -27,14 +28,8 @@ jobs:
pip install jsonref
sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev
- name: Checkout Thunder
uses: actions/checkout@v3
with:
path: Thunder
repository: rdkcentral/Thunder

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Thunder-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}
Expand All @@ -44,10 +39,10 @@ jobs:
tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz
# ----- ThunderInterfaces -----
# ----- Regex & checkout -----
- name: Checkout ThunderInterfaces - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:') }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderInterfaces
repository: rdkcentral/ThunderInterfaces
Expand All @@ -63,13 +58,13 @@ jobs:

- name: Checkout ThunderInterfaces - ${{steps.thunderinterfaces.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:')
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ThunderInterfaces
repository: rdkcentral/ThunderInterfaces
ref: ${{steps.thunderinterfaces.outputs.first_match}}

# ----- Building -----
# ----- Building & uploading -----
- name: Build ThunderInterfaces
run: |
cmake -G Ninja -S ThunderInterfaces -B ${{matrix.build_type}}/build/ThunderInterfaces \
Expand All @@ -82,7 +77,7 @@ jobs:
run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}}

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ThunderInterfaces-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}.tar.gz

0 comments on commit 497cde7

Please sign in to comment.