Skip to content

Commit 75b940f

Browse files
committed
Fix conditional
1 parent 27354ac commit 75b940f

8 files changed

Lines changed: 28 additions & 13 deletions

.github/workflows/_find_changes.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
# protection rules work is: "If a workflow is skipped due to path filtering
2222
# [...] the checks associated with that workflow will remain in a Pending
2323
# state. A PR that requires those checks to be successful will be blocked from
24-
# merging." This makes path filters unusable with merge queues. We forgo the
25-
# use of path filters, and instead check file changes using our own workflow.
24+
# merging." This makes path filters unusable with merge queues. So, we forgo the
25+
# use of path filters and instead check file changes using our own workflow.
2626
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2727

2828
# The tilde is only to make our reusable workflows be listed last in the UI.
@@ -31,6 +31,9 @@ run-name: Determine which files have been changed
3131

3232
on:
3333
workflow_call:
34+
# N.B.: GitHub Actions workflow_call output values are ALWAYS strings, even
35+
# for (what you think are) Booleans. Consequently, calling workflows have to
36+
# test values using, e.g., ${{foo = 'false'}}, and not ${{foo}} or similar.
3437
outputs:
3538
code:
3639
description: 'True if any potential code file was changed'

.github/workflows/ci_build_library.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050

5151
build-wheels:
5252
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
53+
if: >-
54+
${{needs.find-changes.outputs.code == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: ${{matrix.conf.os}}/${{matrix.conf.pyarch}}/py3${{matrix.conf.py}}
5557
needs: find-changes
5658
runs-on: ${{matrix.conf.os}}

.github/workflows/ci_build_wheels.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050

5151
build-wheels:
5252
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
53+
if: >-
54+
${{needs.find-changes.outputs.code == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: Build & test wheels
5557
needs: find-changes
5658
uses: ./.github/workflows/_build_wheels.yaml

.github/workflows/ci_docker_tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050

5151
build-and-test:
5252
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
53+
if: >-
54+
${{needs.find-changes.outputs.code == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: Build and test Docker images
5557
needs: find-changes
5658
runs-on: ubuntu-24.04

.github/workflows/ci_format_checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
needs: find-changes
5858
runs-on: ubuntu-24.04
5959
timeout-minutes: 30
60+
env:
61+
# Add xtrace to SHELLOPTS for all Bash scripts when doing debug runs.
62+
SHELLOPTS: ${{inputs.debug && 'xtrace' || '' }}
6063
steps:
6164
- name: Check out a copy of the git repository
6265
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -79,7 +82,4 @@ jobs:
7982
pip install -r dev-requirements.txt
8083
8184
- name: Check Python file format
82-
env:
83-
# SHELLOPTS is used by Bash. Add xtrace when doing manual debug runs.
84-
SHELLOPTS: ${{inputs.debug && 'xtrace' || '' }}
8585
run: check/format-incremental

.github/workflows/ci_hardware_options.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ jobs:
4949
secrets: inherit
5050

5151
test-options:
52-
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
52+
# For efficiency, skip this workflow if there were no Python file changes.
53+
if: >-
54+
${{needs.find-changes.outputs.python == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: Test ${{matrix.hardware_opt}} + ${{matrix.parallel_opt}}
5557
needs: find-changes
5658
runs-on: ubuntu-24.04

.github/workflows/ci_sanitizer_tests.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ jobs:
4949
secrets: inherit
5050

5151
sanitizer-tests:
52-
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
52+
# For efficiency, skip this workflow if there were no Python file changes.
53+
if: >-
54+
${{needs.find-changes.outputs.python == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: Test with sanitizers
5557
needs: find-changes
5658
runs-on: ubuntu-24.04

.github/workflows/ci_tcmalloc_test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050

5151
tcmalloc-test:
5252
# For efficiency, skip this workflow if there were no code file changes.
53-
if: needs.find-changes.outputs.code || github.event_name == 'workflow_dispatch'
53+
if: >-
54+
${{needs.find-changes.outputs.code == 'true'
55+
|| github.event_name == 'workflow_dispatch'}}
5456
name: Test with TCMalloc
5557
needs: find-changes
5658
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)