Skip to content

Commit 2da1f56

Browse files
committed
gh-actions gcc-16: enable running on other forks
set GITHUB_TOKEN to your personal access token, with at least "repo" permissions curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${GITHUB_TOKEN}"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/simd-everywhere/simde/dispatches \ -d '{"event_type":"on-demand-gcc-16","client_payload":{"ref":"MY_BRANCH","repository":"OWNER/REPO"}}' or gh api \ --method POST \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/simd-everywhere/simde/dispatches \ -f 'event_type=on-demand-gcc-16' -F "client_payload[ref]=MY_BRANCH" -F "client_payload[repository]=OWNER/REPO"
1 parent 8a57b63 commit 2da1f56

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/gcc-snapshot.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- 'master'
77
workflow_dispatch: {}
8+
repository_dispatch:
9+
types: [on-demand-gcc-16]
810

911
concurrency:
1012
group: gcc-snapshot-${{ github.event.pull_request.number || github.ref }}
@@ -36,8 +38,15 @@ jobs:
3638
INTEL_TARGET: ${{ matrix.target }}
3739
steps:
3840
- uses: actions/checkout@v6
41+
if: ${{ github.event_name != 'repository_dispatch' }}
3942
with:
4043
submodules: recursive
44+
- uses: actions/checkout@v6
45+
if: ${{ github.event_name == 'repository_dispatch' }}
46+
with:
47+
submodules: recursive
48+
repository: ${{ github.event.client_payload.repository }}
49+
ref: ${{ github.event.client_payload.ref }}
4150
- name: CPU Information
4251
run: cat /proc/cpuinfo
4352
- name: Install APT Dependencies
@@ -80,8 +89,15 @@ jobs:
8089
CXXFLAGS: -Wall -Wextra -Werror -march=bdver2
8190
steps:
8291
- uses: actions/checkout@v6
92+
if: ${{ github.event_name != 'repository_dispatch' }}
93+
with:
94+
submodules: recursive
95+
- uses: actions/checkout@v6
96+
if: ${{ github.event_name == 'repository_dispatch' }}
8397
with:
8498
submodules: recursive
99+
repository: ${{ github.event.client_payload.repository }}
100+
ref: ${{ github.event.client_payload.ref }}
85101
- name: CPU Information
86102
run: cat /proc/cpuinfo
87103
- name: Install APT Dependencies
@@ -117,8 +133,15 @@ jobs:
117133
CXXFLAGS: -march=native -Wall -Wextra -Werror
118134
steps:
119135
- uses: actions/checkout@v6
136+
if: ${{ github.event_name != 'repository_dispatch' }}
120137
with:
121138
submodules: recursive
139+
- uses: actions/checkout@v6
140+
if: ${{ github.event_name == 'repository_dispatch' }}
141+
with:
142+
submodules: recursive
143+
repository: ${{ github.event.client_payload.repository }}
144+
ref: ${{ github.event.client_payload.ref }}
122145
- id: cpu
123146
name: CPU Information
124147
run: |
@@ -168,8 +191,15 @@ jobs:
168191
CXXFLAGS: ${{ matrix.arch_flags }} -march=native -Wall -Wextra -Werror
169192
steps:
170193
- uses: actions/checkout@v6
194+
if: ${{ github.event_name != 'repository_dispatch' }}
195+
with:
196+
submodules: recursive
197+
- uses: actions/checkout@v6
198+
if: ${{ github.event_name == 'repository_dispatch' }}
171199
with:
172200
submodules: recursive
201+
repository: ${{ github.event.client_payload.repository }}
202+
ref: ${{ github.event.client_payload.ref }}
173203
- id: cpu
174204
name: CPU Information
175205
run: |
@@ -265,8 +295,15 @@ jobs:
265295
runs-on: ${{ matrix.distro }}
266296
steps:
267297
- uses: actions/checkout@v6
298+
if: ${{ github.event_name != 'repository_dispatch' }}
299+
with:
300+
submodules: recursive
301+
- uses: actions/checkout@v6
302+
if: ${{ github.event_name == 'repository_dispatch' }}
268303
with:
269304
submodules: recursive
305+
repository: ${{ github.event.client_payload.repository }}
306+
ref: ${{ github.event.client_payload.ref }}
270307
- name: CPU Information
271308
run: cat /proc/cpuinfo
272309
- name: Install APT Dependencies

0 commit comments

Comments
 (0)