From 718a31ef1a98628d195c19fbda51cb274adba0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 29 May 2025 14:18:35 +0300 Subject: [PATCH] github: Run the test-llvm and test-libcxx jobs scheduled on Sundays In this case, run with the artifacts from the latest scheduled job. --- .github/workflows/test-libcxx.yml | 16 ++++++++++------ .github/workflows/test-llvm.yml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-libcxx.yml b/.github/workflows/test-libcxx.yml index 5279b3f..9371d40 100644 --- a/.github/workflows/test-libcxx.yml +++ b/.github/workflows/test-libcxx.yml @@ -17,9 +17,12 @@ on: options: - push - schedule + schedule: + - cron: '30 13 * * 0' # 13:30 UTC on Sundays jobs: prepare: + if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw') runs-on: ubuntu-latest outputs: LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}} @@ -29,9 +32,9 @@ jobs: with: workflow: build.yml workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.commit == '' && inputs.branch || ''}} - event: ${{inputs.pipeline_type}} + commit: ${{github.event_name != 'schedule' && inputs.commit || ''}} + branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}} + event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}} name: parameters - name: Get build parameters id: get-parameters @@ -40,6 +43,7 @@ jobs: cat $GITHUB_OUTPUT test-libcxx: + if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw') needs: [prepare] strategy: fail-fast: false @@ -59,9 +63,9 @@ jobs: with: workflow: build.yml workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.commit == '' && inputs.branch || ''}} - event: ${{inputs.pipeline_type}} + commit: ${{github.event_name != 'schedule' && inputs.commit || ''}} + branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}} + event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}} name: windows-ucrt-${{matrix.arch}}-toolchain - name: Unpack toolchain run: | diff --git a/.github/workflows/test-llvm.yml b/.github/workflows/test-llvm.yml index e1d5667..fecc12f 100644 --- a/.github/workflows/test-llvm.yml +++ b/.github/workflows/test-llvm.yml @@ -17,9 +17,12 @@ on: options: - push - schedule + schedule: + - cron: '30 13 * * 0' # 13:30 UTC on Sundays jobs: prepare: + if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw') runs-on: ubuntu-latest outputs: LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}} @@ -29,9 +32,9 @@ jobs: with: workflow: build.yml workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.commit == '' && inputs.branch || ''}} - event: ${{inputs.pipeline_type}} + commit: ${{github.event_name != 'schedule' && inputs.commit || ''}} + branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}} + event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}} name: parameters - name: Get build parameters id: get-parameters @@ -40,6 +43,7 @@ jobs: cat $GITHUB_OUTPUT test-llvm: + if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw') needs: [prepare] strategy: fail-fast: false @@ -57,9 +61,9 @@ jobs: with: workflow: build.yml workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.commit == '' && inputs.branch || ''}} - event: ${{inputs.pipeline_type}} + commit: ${{github.event_name != 'schedule' && inputs.commit || ''}} + branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}} + event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}} name: windows-ucrt-${{matrix.arch}}-toolchain - name: Unpack toolchain run: |