Skip to content

Commit

Permalink
[Actions] Not building Thunder with changes only to documentation (#1417
Browse files Browse the repository at this point in the history
)

* Adding a path-ignore to building actions on Linux

* Adding paths-ignore to building actions on Windows

* Adding paths-ignore to the testing action

* Adding more ignored paths to Linux build

* Adding more ignored paths to Windows build

* Adding more ignored paths to testing action

---------

Co-authored-by: Pierre Wielders <[email protected]>
  • Loading branch information
VeithMetro and pwielders authored Oct 4, 2023
1 parent 20036df commit 15fb45d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/Build Thunder on Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ name: Build Thunder on Linux
on:
push:
branches: ["master"]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'
pull_request:
branches: ["master"]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'
workflow_call:

jobs:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/Build Thunder on Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ name: Build Thunder on Windows
on:
push:
branches: ["master"]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'
pull_request:
branches: ["master"]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'

env:
bridge: Thunder\Source\WPEFramework\bridge.vcxproj
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/Test Thunder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ name: Test Thunder
on:
push:
branches: ["master"]
paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'
pull_request:
branches: ["master"]

paths-ignore:
- 'doc/**'
- 'docs/**'
- 'ReleaseNotes/**'

jobs:
Thunder:
runs-on: ubuntu-20.04

strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
Expand All @@ -28,7 +36,7 @@ jobs:
with:
path: Thunder
repository: rdkcentral/Thunder

- name: Regex Thunder
if: contains(github.event.pull_request.body, '[DependsOn=Thunder:')
id: thunder
Expand All @@ -37,23 +45,23 @@ jobs:
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@v3
with:
path: Thunder
repository: rdkcentral/Thunder
ref: ${{steps.thunder.outputs.first_match}}

# ----- ThunderTools -----
- name: Checkout ThunderTools - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderTools:') }}
uses: actions/checkout@v3
with:
path: ThunderTools
repository: rdkcentral/ThunderTools

- name: Regex ThunderTools
if: contains(github.event.pull_request.body, '[DependsOn=ThunderTools:')
id: tools
Expand Down Expand Up @@ -84,13 +92,13 @@ jobs:
sudo apt install python3-pip
pip install jsonref
sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev libgtest-dev
- name: Install generators
run: |
cmake -G Ninja -S ThunderTools -B ${{matrix.build_type}}/build/ThunderTools \
-DCMAKE_INSTALL_PREFIX=${{matrix.build_type}}/install/usr
cmake --build ${{matrix.build_type}}/build/ThunderTools --target install
- name: Build Thunder
run: |
cmake -G Ninja -S Thunder -B ${{matrix.build_type}}/build/Thunder \
Expand All @@ -113,10 +121,10 @@ jobs:

- name: Run core unit tests
run: ${{env.path}} ${{env.lib}} WPEFramework_test_core

- name: Tar files
run: tar -czvf ${{matrix.shared_libs == 'OFF' && 'Static-' || ''}}${{matrix.build_type}}.tar.gz ${{matrix.build_type}}

- name: Upload
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 15fb45d

Please sign in to comment.