Skip to content

Commit 543b000

Browse files
committed
Get rid of early-exit test job
There's a simpler way to do it.
1 parent ec91253 commit 543b000

1 file changed

Lines changed: 30 additions & 32 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ jobs:
104104
echo '::add-matcher::.github/problem-matchers/black.json'
105105
check/format-incremental
106106
107-
# TODO(mhucka): enable pylint check after PR #911 is merged.
107+
# TODO(mhucka): after PR #911 is merged, uncomment this to enable pylint
108+
# checks and also add python-lint to jobs that have "needs".
108109
#
109110
# python-lint:
110111
# name: Python lint checks
@@ -251,39 +252,14 @@ jobs:
251252
flags: ${{inputs.debug && '-verbose'}} ${{steps.changes.outputs.all_changed_files}}
252253
pyflakes: false
253254

254-
continue-testing:
255-
name: (Test for early exit)
256-
if: always()
255+
library-tests:
256+
name: Library tests on ${{matrix.os}} + Py ${{matrix.python_version}}
257257
needs:
258258
- action-lint
259259
- docker-lint
260260
- python-format
261-
# TODO(mhucka): enable pylint check after PR #911 is merged.
262-
# - python-lint
263261
- shell-script-lint
264262
- yaml-lint
265-
runs-on: ubuntu-24.04
266-
timeout-minutes: 5
267-
env:
268-
checks-ok: >-
269-
${{!contains(needs.*.result, 'failure')
270-
&& !contains(needs.*.result, 'cancelled')}}
271-
outputs:
272-
proceed: ${{env.checks-ok || inputs.debug}}
273-
steps:
274-
# Stop the entire workflow with an error, unless we're in debugging mode.
275-
- if: ${{env.checks-ok == 'false' && inputs.debug != 'true'}}
276-
name: Print error message to workflow summary
277-
run: |
278-
{
279-
echo -n ":x: Basic checks failed; skipping longer tests. "
280-
echo "Please correct the problems found so far."
281-
} >> "$GITHUB_STEP_SUMMARY"
282-
exit 1
283-
284-
library-tests:
285-
name: Library tests on ${{matrix.os}} + Py ${{matrix.python_version}}
286-
needs: continue-testing
287263
runs-on: ${{matrix.os}}
288264
timeout-minutes: 60
289265
strategy:
@@ -344,7 +320,14 @@ jobs:
344320
shell: cmd
345321
run: bash -x dev_tools/test_libs.sh ${{inputs.debug && '--config=verbose'}} --action_env PYTHON_BIN_PATH=${{env.root}}\\${{env.exe}}
346322

347-
- name: Install OMP on macOS
323+
- name: Install LLVM and Clang on macOS
324+
if: startsWith(matrix.os, 'macos')
325+
uses: KyleMayes/install-llvm-action@a7a1a882e2d06ebe05d5bb97c3e1f8c984ae96fc # v2
326+
with:
327+
version: "19.0"
328+
env: true
329+
330+
- name: Install OpenMP on macOS
348331
if: startsWith(matrix.os, 'macos')
349332
run: |
350333
brew install -q libomp llvm@19
@@ -361,7 +344,12 @@ jobs:
361344
362345
hardware-options-tests:
363346
name: Hardware options tests
364-
needs: continue-testing
347+
needs:
348+
- action-lint
349+
- docker-lint
350+
- python-format
351+
- shell-script-lint
352+
- yaml-lint
365353
runs-on: ubuntu-24.04
366354
timeout-minutes: 60
367355
strategy:
@@ -411,7 +399,12 @@ jobs:
411399
412400
memory-addressing-tests:
413401
name: Malloc/asan/msan tests
414-
needs: continue-testing
402+
needs:
403+
- action-lint
404+
- docker-lint
405+
- python-format
406+
- shell-script-lint
407+
- yaml-lint
415408
runs-on: ubuntu-24.04
416409
timeout-minutes: 60
417410
env:
@@ -461,7 +454,12 @@ jobs:
461454

462455
docker-tests:
463456
name: Docker build tests
464-
needs: continue-testing
457+
needs:
458+
- action-lint
459+
- docker-lint
460+
- python-format
461+
- shell-script-lint
462+
- yaml-lint
465463
runs-on: ubuntu-24.04
466464
timeout-minutes: 60
467465
env:

0 commit comments

Comments
 (0)