4545 tags :
4646 - ' **'
4747 pull_request :
48- paths :
49- - ' .dockerignore'
50- - ' .github/workflows/check_labels.yml'
51- - ' .github/workflows/cpp_extra.yml'
52- - ' .github/workflows/cpp_windows.yml'
53- - ' .github/workflows/report_ci.yml'
54- - ' ci/conda_env_*'
55- - ' ci/docker/**'
56- - ' ci/scripts/ccache_setup.sh'
57- - ' ci/scripts/cpp_*'
58- - ' ci/scripts/install_azurite.sh'
59- - ' ci/scripts/install_gcs_testbench.sh'
60- - ' ci/scripts/install_minio.sh'
61- - ' ci/scripts/msys2_*'
62- - ' ci/scripts/util_*'
63- - ' cpp/**'
64- - ' compose.yaml'
65- - ' dev/archery/archery/**'
66- - ' format/Flight.proto'
67- - ' testing'
48+ # This trigger ensures that the `check_labels` workflow runs on manual label changes
6849 types :
6950 - labeled
7051 - opened
@@ -85,19 +66,30 @@ permissions:
8566
8667jobs :
8768 check-labels :
88- if : github.event_name != 'schedule' || github.repository == 'apache/arrow '
69+ if : github.event_name == 'pull_request '
8970 uses : ./.github/workflows/check_labels.yml
9071 with :
9172 parent-workflow : cpp_extra
9273
93- docker :
74+ check-enabled :
75+ # Check whether the CI builds in this workflow need to be run
9476 needs : check-labels
77+ runs-on : ubuntu-latest
78+ outputs :
79+ is_enabled : ${{ steps.set_enabled.outputs.is_enabled }}
80+ steps :
81+ - id : set_enabled
82+ if : >-
83+ (github.event_name == 'schedule' && github.repository == 'apache/arrow') ||
84+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
85+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
86+ run : echo "is_enabled=true" >> "$GITHUB_OUTPUT"
87+
88+ docker :
89+ needs : check-enabled
90+ if : needs.check-enabled.outputs.is_enabled == 'true'
9591 name : ${{ matrix.title }}
9692 runs-on : ${{ matrix.runs-on }}
97- if : >-
98- needs.check-labels.outputs.force == 'true' ||
99- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
100- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
10193 timeout-minutes : 75
10294 strategy :
10395 fail-fast : false
@@ -189,11 +181,8 @@ jobs:
189181 run : archery docker push ${{ matrix.image }}
190182
191183 msvc-arm64 :
192- needs : check-labels
193- if : >-
194- needs.check-labels.outputs.force == 'true' ||
195- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
196- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
184+ needs : check-enabled
185+ if : needs.check-enabled.outputs.is_enabled == 'true'
197186 name : ARM64 Windows 11 MSVC
198187 uses : ./.github/workflows/cpp_windows.yml
199188 with :
@@ -202,13 +191,10 @@ jobs:
202191 simd-level : NONE
203192
204193 jni-linux :
205- needs : check-labels
194+ needs : check-enabled
195+ if : needs.check-enabled.outputs.is_enabled == 'true'
206196 name : JNI ${{ matrix.platform.runs-on }} ${{ matrix.platform.arch }}
207197 runs-on : ${{ matrix.platform.runs-on }}
208- if : >-
209- needs.check-labels.outputs.force == 'true' ||
210- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
211- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
212198 timeout-minutes : 240
213199 permissions :
214200 actions : read
@@ -276,13 +262,10 @@ jobs:
276262 run : archery docker push cpp-jni
277263
278264 jni-macos :
279- needs : check-labels
265+ needs : check-enabled
266+ if : needs.check-enabled.outputs.is_enabled == 'true'
280267 name : JNI macOS
281268 runs-on : macos-14
282- if : >-
283- needs.check-labels.outputs.force == 'true' ||
284- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
285- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
286269 timeout-minutes : 45
287270 env :
288271 MACOSX_DEPLOYMENT_TARGET : " 14.0"
@@ -369,13 +352,10 @@ jobs:
369352 key : jni-macos
370353
371354 odbc-linux :
372- needs : check-labels
355+ needs : check-enabled
356+ if : needs.check-enabled.outputs.is_enabled == 'true'
373357 name : ODBC Linux
374358 runs-on : ubuntu-latest
375- if : >-
376- needs.check-labels.outputs.force == 'true' ||
377- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
378- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
379359 timeout-minutes : 75
380360 strategy :
381361 fail-fast : false
@@ -437,13 +417,10 @@ jobs:
437417 run : archery docker push ubuntu-cpp-odbc
438418
439419 odbc-macos :
440- needs : check-labels
420+ needs : check-enabled
421+ if : needs.check-enabled.outputs.is_enabled == 'true'
441422 name : ODBC ${{ matrix.build-type }} ${{ matrix.architecture }} macOS ${{ matrix.macos-version }}
442423 runs-on : macos-${{ matrix.macos-version }}
443- if : >-
444- needs.check-labels.outputs.force == 'true' ||
445- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
446- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
447424 timeout-minutes : 120
448425 strategy :
449426 fail-fast : false
@@ -569,13 +546,10 @@ jobs:
569546 ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
570547
571548 odbc-msvc :
572- needs : check-labels
549+ needs : check-enabled
550+ if : needs.check-enabled.outputs.is_enabled == 'true'
573551 name : ODBC Windows
574552 runs-on : windows-2022
575- if : >-
576- needs.check-labels.outputs.force == 'true' ||
577- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
578- contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
579553 timeout-minutes : 240
580554 permissions :
581555 actions : read
0 commit comments