arch: ${{ matrix.arch }}
free-threading: ${{ matrix.free-threading }}
- build-windows-msi:
- name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
- Windows MSI${{ '' }}
- needs: build-context
- if: fromJSON(needs.build-context.outputs.run-windows-msi)
- strategy:
- fail-fast: false
- matrix:
- arch:
- - x86
- - x64
- - arm64
- uses: ./.github/workflows/reusable-windows-msi.yml
- with:
- arch: ${{ matrix.arch }}
-
build-macos:
name: >-
macOS
- check-autoconf-regen
- check-generated-files
- build-windows
- - build-windows-msi
- build-macos
- build-ubuntu
- build-ubuntu-ssltests
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
allowed-failures: >-
- build-windows-msi,
build-ubuntu-ssltests,
test-hypothesis,
allowed-skips: >-
run_tests:
description: Whether to run the regular tests
value: ${{ jobs.compute-changes.outputs.run-tests || false }} # bool
- run-win-msi:
- description: Whether to run the MSI installer smoke tests
- value: >- # bool
- ${{ jobs.compute-changes.outputs.run-win-msi || false }}
run_hypothesis:
description: Whether to run the Hypothesis tests
value: >- # bool
run-docs: ${{ steps.docs-changes.outputs.run-docs }}
run-hypothesis: ${{ steps.check.outputs.run-hypothesis }}
run-tests: ${{ steps.check.outputs.run-tests }}
- run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi }}
steps:
- run: >-
echo '${{ github.event_name }}'
id: docs-changes
run: |
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
- - name: Get a list of the MSI installer-related files
- if: github.event_name == 'pull_request'
- id: changed-win-msi-files
- uses: Ana06/get-changed-files@v2.3.0
- with:
- filter: |
- Tools/msi/**
- .github/workflows/reusable-windows-msi.yml
- format: csv # works for paths with spaces
- - name: Check for changes in MSI installer-related files
- # We only want to run this on PRs when related files are changed,
- # or when user triggers manual workflow run.
- if: >-
- (
- github.event_name == 'pull_request'
- && steps.changed-win-msi-files.outputs.added_modified_renamed != ''
- ) || github.event_name == 'workflow_dispatch'
- id: win-msi-changes
- run: |
- echo "run-win-msi=true" >> "${GITHUB_OUTPUT}"
run-windows-tests:
description: Whether to run the Windows tests
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
- run-windows-msi:
- description: Whether to run the MSI installer smoke tests
- value: ${{ jobs.compute-changes.outputs.run-windows-msi }} # bool
run-ci-fuzz:
description: Whether to run the CIFuzz job
value: ${{ jobs.compute-changes.outputs.run-ci-fuzz }} # bool
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
run-docs: ${{ steps.changes.outputs.run-docs }}
run-tests: ${{ steps.changes.outputs.run-tests }}
- run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
steps:
- name: Set up Python
+++ /dev/null
-name: Reusable Windows MSI
-
-on:
- workflow_call:
- inputs:
- arch:
- description: CPU architecture
- required: true
- type: string
-
-permissions:
- contents: read
-
-env:
- FORCE_COLOR: 1
-
-jobs:
- build:
- name: installer for ${{ inputs.arch }}
- runs-on: windows-2022
- timeout-minutes: 60
- env:
- ARCH: ${{ inputs.arch }}
- IncludeFreethreaded: true
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- - name: Build CPython installer
- run: ./Tools/msi/build.bat --doc -"${ARCH}"
- shell: bash
run_ci_fuzz: bool = False
run_docs: bool = False
run_tests: bool = False
- run_windows_msi: bool = False
run_windows_tests: bool = False
if outputs.run_docs:
print("Build documentation")
- if outputs.run_windows_msi:
- print("Build Windows MSI")
-
print(outputs)
write_github_output(outputs)
run_ci_fuzz = False
run_docs = False
run_windows_tests = False
- run_windows_msi = False
for file in changed_files:
# Documentation files
run_tests = run_ci_fuzz = True
if file.name == "reusable-docs.yml":
run_docs = True
- if file.name == "reusable-windows-msi.yml":
- run_windows_msi = True
if not (
doc_file
if doc_file:
run_docs = True
- # Check for changed MSI installer-related files
- if file.parts[:2] == ("Tools", "msi"):
- run_windows_msi = True
-
return Outputs(
run_ci_fuzz=run_ci_fuzz,
run_docs=run_docs,
run_tests=run_tests,
run_windows_tests=run_windows_tests,
- run_windows_msi=run_windows_msi,
)
if os.environ.get("GITHUB_EVENT_NAME", "").lower() == "workflow_dispatch":
outputs.run_docs = True
- outputs.run_windows_msi = True
return outputs
f.write(f"run-docs={bool_lower(outputs.run_docs)}\n")
f.write(f"run-tests={bool_lower(outputs.run_tests)}\n")
f.write(f"run-windows-tests={bool_lower(outputs.run_windows_tests)}\n")
- f.write(f"run-windows-msi={bool_lower(outputs.run_windows_msi)}\n")
def bool_lower(value: bool, /) -> str: