8000 Only run check warnings when necessary · python/cpython@ef982eb · GitHub
[go: up one dir, main page]

Skip to content

Commit ef982eb

Browse files
committed
Only run check warnings when necessary
1 parent e31f6d1 commit ef982eb

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,22 @@ jobs:
164164
free-threading:
165165
- false
166166
- true
167+
check-warnings:
168+
- false
169+
- true
167170
exclude:
168171
- os: ghcr.io/cirruslabs/macos-runner:sonoma
169172
is-fork: true
170173
- os: macos-14
171174
is-fork: false
172175
- os: macos-13
173176
free-threading: true
177+
- os: macos-13
178+
check-warnings: true
179+
- free-threading: true
180+
check-warnings: true
181+
- os: ghcr.io/cirruslabs/macos-runner:sonoma
182+
check-warnings: true
174183
uses: ./.github/workflows/reusable-macos.yml
175184
with:
176185
config_hash: ${{ needs.check_source.outputs.config_hash }}

.github/workflows/reusable-macos.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ jobs:
4747
${{ inputs.free-threading && '--disable-gil' || '' }} \
4848
--prefix=/opt/python-dev \
4949
--with-openssl="$(brew --prefix openssl@3.0)"
50-
- name: Build CPython
50+
- name: Build CPython for Compiler Warning Check
51+
if : ${{ inputs.check-warnings }}
5152
run: set -o pipefail; make -j1 2>&1 | tee compiler_output_macos.txt
53+
- name: Build CPython
54+
if : ${{ !inputs.check-warnings }}
55+
run: make -j4
5256
- name: Display build info
5357
run: make pythoninfo
5458
- name: Check compiler warnings
59+
if: ${{ inputs.check-warnings }}
5560
run: >-
5661
python3 Tools/build/check_warnings.py
5762
--compiler-output-file-path=compiler_output_macos.txt

.github/workflows/reusable-ubuntu.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,19 @@ jobs:
7373
--enable-slower-safety
7474
--with-openssl=$OPENSSL_DIR
7575
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
76-
- name: Build CPython out-of-tree
76+
- name: Build CPython out-of-tree (for compiler warning check)
77+
if: ${{ !inputs.free-threading}}
7778
working-directory: ${{ env.CPYTHON_BUILDDIR }}
7879
run: set -o pipefail; make -j4 2>&1 | tee compiler_output_ubuntu.txt
80+
- name: Build CPython out-of-tree
81+
if: ${{ inputs.free-threading }}
82+
working-directory: ${{ env.CPYTHON_BUILDDIR }}
83+
run: make -j4
7984
- name: Display build info
8085
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8186
run: make pythoninfo
8287
- name: Check compiler warnings
83-
if: ${{ !fromJSON(inputs.free-threading) }}
88+
if: ${{ !inputs.free-threading }}
8489
run: >-
8590
python Tools/build/check_warnings.py
8691
--compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output_ubuntu.txt

0 commit comments

Comments
 (0)
0