Skip to content

Commit 4d3eeec

Browse files
authored
Add result CI job to enable auto-merge (#12)
* Add `result` CI job to enable auto-merge * Avoid triggering duplicated jobs on PRs * Drop cancel-in-progress We don't run as many jobs as ruby/ruby CI. We shouldn't need this here. * Fix a typo * Drop the concurrency group too Similarly, we shouldn't need this in the Shopify/zjit repo
1 parent 5676c13 commit 4d3eeec

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

.github/workflows/yjit-macos.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: YJIT macOS Arm64
22
on:
33
push:
4+
branches:
5+
- master
46
paths-ignore:
57
- 'doc/**'
68
- '**/man/*'
@@ -9,14 +11,14 @@ on:
911
- '**/.document'
1012
- '.*.yml'
1113
pull_request:
14+
types:
15+
- opened
16+
- synchronize
17+
- reopened
1218
# Do not use paths-ignore for required status checks
1319
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
1420
merge_group:
1521

16-
concurrency:
17-
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
18-
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
19-
2022
permissions:
2123
contents: read
2224

@@ -162,7 +164,8 @@ jobs:
162164
runs-on: macos-14
163165
needs: [make]
164166
steps:
165-
- run: exit 1
167+
- name: ${{ github.workflow }} jobs have failed
168+
run: exit 1
166169
working-directory:
167170
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
168171

.github/workflows/zjit-macos.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ jobs:
102102
BTESTS: ${{ matrix.btests }}
103103
continue-on-error: ${{ matrix.continue-on-test_task || false }}
104104

105-
- uses: ./.github/actions/slack
106-
with:
107-
label: ${{ matrix.test_task }} ${{ matrix.configure }} ${{ matrix.zjit_opts }}
108-
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
109-
if: ${{ failure() }}
105+
result:
106+
if: ${{ always() }}
107+
name: ${{ github.workflow }} result
108+
runs-on: macos-14
109+
needs: [make]
110+
steps:
111+
- run: exit 1
112+
working-directory:
113+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
110114

111115
defaults:
112116
run:

.github/workflows/zjit-ubuntu.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: ZJIT Ubuntu
22
on:
33
push:
4+
branches:
5+
- master
46
paths-ignore:
57
- 'doc/**'
68
- '**/man/*'
@@ -9,14 +11,14 @@ on:
911
- '**/.document'
1012
- '.*.yml'
1113
pull_request:
14+
types:
15+
- opened
16+
- synchronize
17+
- reopened
1218
# Do not use paths-ignore for required status checks
1319
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
1420
merge_group:
1521

16-
concurrency:
17-
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
18-
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
19-
2022
permissions:
2123
contents: read
2224

@@ -128,11 +130,16 @@ jobs:
128130
BTESTS: ${{ matrix.btests }}
129131
continue-on-error: ${{ matrix.continue-on-test_task || false }}
130132

131-
- uses: ./.github/actions/slack
132-
with:
133-
label: ${{ matrix.test_task }} ${{ matrix.configure }}
134-
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
135-
if: ${{ failure() }}
133+
result:
134+
if: ${{ always() }}
135+
name: ${{ github.workflow }} result
136+
runs-on: ubuntu-22.04
137+
needs: [make]
138+
steps:
139+
- name: ${{ github.workflow }} jobs have failed
140+
run: exit 1
141+
working-directory:
142+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
136143

137144
defaults:
138145
run:

0 commit comments

Comments
 (0)