Skip to content

Commit 718a31e

Browse files
committed
github: Run the test-llvm and test-libcxx jobs scheduled on Sundays
In this case, run with the artifacts from the latest scheduled job.
1 parent 7b53b4a commit 718a31e

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/test-libcxx.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ on:
1717
options:
1818
- push
1919
- schedule
20+
schedule:
21+
- cron: '30 13 * * 0' # 13:30 UTC on Sundays
2022

2123
jobs:
2224
prepare:
25+
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
2326
runs-on: ubuntu-latest
2427
outputs:
2528
LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}}
@@ -29,9 +32,9 @@ jobs:
2932
with:
3033
workflow: build.yml
3134
workflow_conclusion: success
32-
commit: ${{inputs.commit}}
33-
branch: ${{inputs.commit == '' && inputs.branch || ''}}
34-
event: ${{inputs.pipeline_type}}
35+
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
36+
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
37+
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
3538
name: parameters
3639
- name: Get build parameters
3740
id: get-parameters
@@ -40,6 +43,7 @@ jobs:
4043
cat $GITHUB_OUTPUT
4144
4245
test-libcxx:
46+
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
4347
needs: [prepare]
4448
strategy:
4549
fail-fast: false
@@ -59,9 +63,9 @@ jobs:
5963
with:
6064
workflow: build.yml
6165
workflow_conclusion: success
62-
commit: ${{inputs.commit}}
63-
branch: ${{inputs.commit == '' && inputs.branch || ''}}
64-
event: ${{inputs.pipeline_type}}
66+
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
67+
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
68+
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
6569
name: windows-ucrt-${{matrix.arch}}-toolchain
6670
- name: Unpack toolchain
6771
run: |

.github/workflows/test-llvm.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ on:
1717
options:
1818
- push
1919
- schedule
20+
schedule:
21+
- cron: '30 13 * * 0' # 13:30 UTC on Sundays
2022

2123
jobs:
2224
prepare:
25+
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
2326
runs-on: ubuntu-latest
2427
outputs:
2528
LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}}
@@ -29,9 +32,9 @@ jobs:
2932
with:
3033
workflow: build.yml
3134
workflow_conclusion: success
32-
commit: ${{inputs.commit}}
33-
branch: ${{inputs.commit == '' && inputs.branch || ''}}
34-
event: ${{inputs.pipeline_type}}
35+
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
36+
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
37+
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
3538
name: parameters
3639
- name: Get build parameters
3740
id: get-parameters
@@ -40,6 +43,7 @@ jobs:
4043
cat $GITHUB_OUTPUT
4144
4245
test-llvm:
46+
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
4347
needs: [prepare]
4448
strategy:
4549
fail-fast: false
@@ -57,9 +61,9 @@ jobs:
5761
with:
5862
workflow: build.yml
5963
workflow_conclusion: success
60-
commit: ${{inputs.commit}}
61-
branch: ${{inputs.commit == '' && inputs.branch || ''}}
62-
event: ${{inputs.pipeline_type}}
64+
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
65+
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
66+
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
6367
name: windows-ucrt-${{matrix.arch}}-toolchain
6468
- name: Unpack toolchain
6569
run: |

0 commit comments

Comments
 (0)