Skip to content

Commit 8e90268

Browse files
committed
github: Simplify the if: conditions for all chained jobs
As all the other jobs depend on the "prepare" job, it's enough to keep the condition within the "prepare" job and remove/simplify the rest.
1 parent 6cc02cf commit 8e90268

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
retention-days: 7
6666

6767
linux-stage1:
68-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
6968
needs: [prepare]
7069
runs-on: ubuntu-22.04
7170
steps:
@@ -98,7 +97,6 @@ jobs:
9897
retention-days: 7
9998

10099
linux-profile:
101-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
102100
needs: [prepare, linux-stage1]
103101
runs-on: ubuntu-22.04
104102
steps:
@@ -130,7 +128,6 @@ jobs:
130128

131129
# Build a cross compiler for Linux, targeting Windows.
132130
linux:
133-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
134131
needs: [prepare, linux-stage1, linux-profile]
135132
runs-on: ubuntu-22.04
136133
steps:
@@ -175,7 +172,6 @@ jobs:
175172
# Crosscompile the toolchain for running on Linux on a different architecture, bundle the runtime
176173
# libraries that were built in the 'linux-stage1' step above.
177174
linux-cross-aarch64:
178-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
179175
needs: [linux-stage1, linux-profile, prepare]
180176
runs-on: ubuntu-22.04
181177
steps:
@@ -233,7 +229,7 @@ jobs:
233229
# to better catch such bugs early. This makes the first-stage toolchain built
234230
# here in scheduled builds somewhat slower.
235231
linux-asserts:
236-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
232+
if: github.event_name == 'schedule'
237233
needs: [prepare]
238234
runs-on: ubuntu-latest
239235
steps:
@@ -261,7 +257,6 @@ jobs:
261257
retention-days: 7
262258

263259
macos-stage1:
264-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
265260
needs: [prepare]
266261
runs-on: macos-latest
267262
steps:
@@ -291,7 +286,6 @@ jobs:
291286

292287
# Build a cross compiler for macOS, targeting Windows.
293288
macos:
294-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
295289
needs: [prepare, macos-stage1, linux-profile]
296290
runs-on: macos-latest
297291
steps:
@@ -339,7 +333,6 @@ jobs:
339333
# environments). The binaries built here rely on the runtime libraries from
340334
# the host environment (libstdc++ or libc++).
341335
msys2:
342-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
343336
needs: [prepare]
344337
runs-on: windows-latest
345338
defaults:
@@ -396,7 +389,6 @@ jobs:
396389
# llvm and make a proper standalone toolchain for Windows (for all 4
397390
# architectures). The binaries built here match actual releases quite closely.
398391
linux-cross-windows:
399-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
400392
needs: [linux-stage1, linux-profile, prepare]
401393
runs-on: ubuntu-latest
402394
strategy:
@@ -446,7 +438,6 @@ jobs:
446438

447439
# Run llvm-mingw's tests with the cross-built toolchains from above.
448440
test-toolchain:
449-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
450441
needs: [linux-cross-windows]
451442
defaults:
452443
run:
@@ -557,7 +548,7 @@ jobs:
557548
# This also forces testing the bundled python executables.
558549
test-openmp:
559550
# Only running these tests in scheduled builds.
560-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
551+
if: github.event_name == 'schedule'
561552
needs: [linux-cross-windows, prepare]
562553
strategy:
563554
fail-fast: false
@@ -624,7 +615,7 @@ jobs:
624615
# also forces testing the bundled python executables.
625616
test-compiler-rt:
626617
# Only running these tests in scheduled builds.
627-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
618+
if: github.event_name == 'schedule'
628619
needs: [linux-cross-windows, prepare]
629620
strategy:
630621
fail-fast: false
@@ -705,7 +696,7 @@ jobs:
705696
# enabled, to catch code generation bugs that might trigger asserts, to
706697
# find such regressions early.
707698
linux-test-cross-build-ffmpeg:
708-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
699+
if: github.event_name == 'schedule'
709700
needs: [linux-asserts]
710701
runs-on: ubuntu-latest
711702
strategy:
@@ -750,7 +741,7 @@ jobs:
750741
# compiler itself, but that only show up at runtime. This is only done
751742
# for scheduled builds.
752743
test-ffmpeg:
753-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
744+
if: github.event_name == 'schedule'
754745
needs: [linux-cross-windows]
755746
runs-on: windows-latest
756747
defaults:
@@ -797,7 +788,7 @@ jobs:
797788
make -j$(nproc) fate
798789
799790
upload-nightly:
800-
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
791+
if: github.event_name == 'schedule'
801792
permissions:
802793
contents: write
803794
needs: [linux, linux-cross-aarch64, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg]

.github/workflows/test-libcxx.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
cat $GITHUB_OUTPUT
4040
4141
test-libcxx:
42-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
4342
needs: [prepare]
4443
strategy:
4544
fail-fast: false

.github/workflows/test-llvm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
cat $GITHUB_OUTPUT
4040
4141
test-llvm:
42-
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
4342
needs: [prepare]
4443
strategy:
4544
fail-fast: false

0 commit comments

Comments
 (0)