Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Actions] Updating deprecated actions, removing unnecessary checkouts, adding workflow dispatch call #351

Merged
merged 10 commits into from
Jun 6, 2024
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
Loading