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.
This commit is contained in:
Martin Storsjö committed 2025-06-30 14:13:23 +03:00
1 parent 6cc02cf854
commit 8e90268bf3
3 files changed
+6 -17

No files matched your search

+6 -15
View File
@@ -65,7 +65,6 @@ jobs:
retention-days: 7
linux-stage1:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare]
runs-on: ubuntu-22.04
steps:
@@ -98,7 +97,6 @@ jobs:
retention-days: 7
linux-profile:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare, linux-stage1]
runs-on: ubuntu-22.04
steps:
@@ -130,7 +128,6 @@ jobs:
# Build a cross compiler for Linux, targeting Windows.
linux:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare, linux-stage1, linux-profile]
runs-on: ubuntu-22.04
steps:
@@ -175,7 +172,6 @@ jobs:
# Crosscompile the toolchain for running on Linux on a different architecture, bundle the runtime
# libraries that were built in the 'linux-stage1' step above.
linux-cross-aarch64:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [linux-stage1, linux-profile, prepare]
runs-on: ubuntu-22.04
steps:
@@ -233,7 +229,7 @@ jobs:
# to better catch such bugs early. This makes the first-stage toolchain built
# here in scheduled builds somewhat slower.
linux-asserts:
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
needs: [prepare]
runs-on: ubuntu-latest
steps:
@@ -261,7 +257,6 @@ jobs:
retention-days: 7
macos-stage1:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare]
runs-on: macos-latest
steps:
@@ -291,7 +286,6 @@ jobs:
# Build a cross compiler for macOS, targeting Windows.
macos:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare, macos-stage1, linux-profile]
runs-on: macos-latest
steps:
@@ -339,7 +333,6 @@ jobs:
# environments). The binaries built here rely on the runtime libraries from
# the host environment (libstdc++ or libc++).
msys2:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare]
runs-on: windows-latest
defaults:
@@ -396,7 +389,6 @@ jobs:
# llvm and make a proper standalone toolchain for Windows (for all 4
# architectures). The binaries built here match actual releases quite closely.
linux-cross-windows:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [linux-stage1, linux-profile, prepare]
runs-on: ubuntu-latest
strategy:
@@ -446,7 +438,6 @@ jobs:
# Run llvm-mingw's tests with the cross-built toolchains from above.
test-toolchain:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [linux-cross-windows]
defaults:
run:
@@ -557,7 +548,7 @@ jobs:
# This also forces testing the bundled python executables.
test-openmp:
# Only running these tests in scheduled builds.
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
needs: [linux-cross-windows, prepare]
strategy:
fail-fast: false
@@ -624,7 +615,7 @@ jobs:
# also forces testing the bundled python executables.
test-compiler-rt:
# Only running these tests in scheduled builds.
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
needs: [linux-cross-windows, prepare]
strategy:
fail-fast: false
@@ -705,7 +696,7 @@ jobs:
# enabled, to catch code generation bugs that might trigger asserts, to
# find such regressions early.
linux-test-cross-build-ffmpeg:
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
needs: [linux-asserts]
runs-on: ubuntu-latest
strategy:
@@ -750,7 +741,7 @@ jobs:
# compiler itself, but that only show up at runtime. This is only done
# for scheduled builds.
test-ffmpeg:
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
needs: [linux-cross-windows]
runs-on: windows-latest
defaults:
@@ -797,7 +788,7 @@ jobs:
make -j$(nproc) fate
upload-nightly:
if: (github.event_name == 'schedule') && (github.repository == 'mstorsjo/llvm-mingw')
if: github.event_name == 'schedule'
permissions:
contents: write
needs: [linux, linux-cross-aarch64, macos, linux-cross-windows, test-toolchain, linux-test-cross-build-ffmpeg, test-ffmpeg]
-1
View File
@@ -39,7 +39,6 @@ jobs:
cat $GITHUB_OUTPUT
test-libcxx:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare]
strategy:
fail-fast: false
-1
View File
@@ -39,7 +39,6 @@ jobs:
cat $GITHUB_OUTPUT
test-llvm:
if: (github.event_name != 'schedule') || (github.repository == 'mstorsjo/llvm-mingw')
needs: [prepare]
strategy:
fail-fast: false