Skip to content

Commit fa17348

Browse files
authored
Separate actions for PR/PUSH (#1252)
This PR separates GitHub Actions workflows to handle push and pull request events separately, improving CI/CD organization and allowing for different behaviors based on trigger type. - Converted existing combined workflows into reusable workflows that accept a trigger_type parameter - Created separate PR and push-specific workflows for each platform (Linux x64, Linux ARM64, Windows) - Updated README badges to reference the new push-specific workflow files Fix: #1250
1 parent 9c2558c commit fa17348

13 files changed

+131
-143
lines changed

.github/workflows/linux-arm64-build-and-test.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
name: Linux arm64
1+
name: Linux ARM64 Build and Test (Reusable)
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
- kilted
8-
- jazzy
9-
- humble-hawksbill
10-
pull_request:
11-
branches:
12-
- develop
13-
- kilted
14-
- jazzy
15-
- humble-hawksbill
16-
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
trigger_type:
7+
description: 'Type of trigger (pr or push)'
8+
required: true
9+
type: string
1710

1811
defaults:
1912
run:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Linux ARM64 - Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- kilted
8+
- jazzy
9+
- humble-hawksbill
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
uses: ./.github/workflows/linux-arm64-build-and-test.yml
15+
with:
16+
trigger_type: "pr"
17+
secrets: inherit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Linux ARM64 - Push to Branches
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- kilted
8+
- jazzy
9+
- humble-hawksbill
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
uses: ./.github/workflows/linux-arm64-build-and-test.yml
15+
with:
16+
trigger_type: "push"
17+
secrets: inherit

.github/workflows/linux-build-and-test-compatibility.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/linux-x64-build-and-test.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
name: Linux x64
1+
name: Build and Test (Reusable)
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
- kilted
8-
- jazzy
9-
- humble-hawksbill
10-
pull_request:
11-
branches:
12-
- develop
13-
- kilted
14-
- jazzy
15-
- humble-hawksbill
16-
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
trigger_type:
7+
description: 'Type of trigger (pr or push)'
8+
required: true
9+
type: string
1710

1811
defaults:
1912
run:
@@ -83,14 +76,16 @@ jobs:
8376
npm run clean
8477
8578
- name: Coveralls Parallel
79+
if: ${{ matrix.ros_distribution == 'rolling' && matrix['node-version'] == '24.X' }}
8680
uses: coverallsapp/github-action@v2
8781
with:
8882
github-token: ${{ secrets.GITHUB_TOKEN }}
89-
flag-name: run-${{ matrix.node-version }}-${{ matrix.architecture }}
83+
flag-name: run-${{ inputs.trigger_type }}-${{ matrix.node-version }}-${{ matrix.architecture }}
9084
parallel: true
9185

9286
finish:
9387
needs: build
88+
if: always()
9489
runs-on: ubuntu-latest
9590
steps:
9691
- name: Coveralls Finished
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Linux x64 - Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- kilted
8+
- jazzy
9+
- humble-hawksbill
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
uses: ./.github/workflows/linux-x64-build-and-test.yml
15+
with:
16+
trigger_type: "pr"
17+
secrets: inherit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Linux x64 - Push to Branches
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- kilted
8+
- jazzy
9+
- humble-hawksbill
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
uses: ./.github/workflows/linux-x64-build-and-test.yml
15+
with:
16+
trigger_type: "push"
17+
secrets: inherit

.github/workflows/windows-build-and-test-compatibility.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/windows-build-and-test.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
name: Windows
1+
name: Windows Build and Test (Reusable)
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
- kilted
8-
- jazzy
9-
- humble-hawksbill
10-
pull_request:
11-
branches:
12-
- develop
13-
- kilted
14-
- jazzy
15-
- humble-hawksbill
16-
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
trigger_type:
7+
description: 'Type of trigger (pr or push)'
8+
required: true
9+
type: string
1710

1811
jobs:
1912
build:
@@ -57,7 +50,7 @@ jobs:
5750
call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat"
5851
npm i
5952
60-
# On the windows/foxy combination the Eclipse CycloneDDS RMW implementation is used to workaround
53+
# On the windows/foxy combination the Eclipse CycloneDDS RMW implementation is used to workaround
6154
# an error when loading the default fastrtps ddl
6255
- name: Test rclnodejs
6356
shell: cmd
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Windows - Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- kilted
8+
- jazzy
9+
- humble-hawksbill
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
uses: ./.github/workflows/windows-build-and-test.yml
15+
with:
16+
trigger_type: "pr"
17+
secrets: inherit

0 commit comments

Comments
 (0)