mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] Fix using check_source
flags as bool (GH-121848) (#121855)
This commit is contained in:
parent
106d6456ca
commit
61d5e87892
2 changed files with 24 additions and 3 deletions
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
|
@ -35,10 +35,30 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
outputs:
|
outputs:
|
||||||
|
# Some of the referenced steps set outputs conditionally and there may be
|
||||||
|
# cases when referencing them evaluates to empty strings. It is nice to
|
||||||
|
# work with proper booleans so they have to be evaluated through JSON
|
||||||
|
# conversion in the expressions. However, empty strings used like that
|
||||||
|
# may trigger all sorts of undefined and hard-to-debug behaviors in
|
||||||
|
# GitHub Actions CI/CD. To help with this, all of the outputs set here
|
||||||
|
# that are meant to be used as boolean flags (and not arbitrary strings),
|
||||||
|
# MUST have fallbacks with default values set. A common pattern would be
|
||||||
|
# to add ` || false` to all such expressions here, in the output
|
||||||
|
# definitions. They can then later be safely used through the following
|
||||||
|
# idiom in job conditionals and other expressions. Here's some examples:
|
||||||
|
#
|
||||||
|
# if: fromJSON(needs.check_source.outputs.run-docs)
|
||||||
|
#
|
||||||
|
# ${{
|
||||||
|
# fromJSON(needs.check_source.outputs.run_tests)
|
||||||
|
# && 'truthy-branch'
|
||||||
|
# || 'falsy-branch'
|
||||||
|
# }}
|
||||||
|
#
|
||||||
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
|
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
|
||||||
run_tests: ${{ steps.check.outputs.run_tests }}
|
run_tests: ${{ steps.check.outputs.run_tests || false }}
|
||||||
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
|
run_hypothesis: ${{ steps.check.outputs.run_hypothesis || false }}
|
||||||
config_hash: ${{ steps.config_hash.outputs.hash }}
|
config_hash: ${{ steps.config_hash.outputs.hash }} # str
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Check for source changes
|
- name: Check for source changes
|
||||||
|
|
1
.github/workflows/reusable-windows.yml
vendored
1
.github/workflows/reusable-windows.yml
vendored
|
@ -2,6 +2,7 @@ on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
free-threading:
|
free-threading:
|
||||||
|
description: Whether to compile CPython in free-threading mode
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue