Skip to content

Commit

Permalink
🧪💅 Integrate build_msi into main CI workflow
Browse files Browse the repository at this point in the history
Previously, this workflow would run on related file changes and not
contribute the the overall outcome of the CI run. This patch turns it
into a reusable workflow, integrating it closer with the rest of the
setup. It remains non-voting and skips or failures will not block the
CI, just as before.
  • Loading branch information
webknjaz committed Jul 18, 2024
1 parent 7431c37 commit 6ead508
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 40 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
# }}
#
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi || false }}
run_tests: ${{ steps.check.outputs.run_tests || false }}
run_hypothesis: ${{ steps.check.outputs.run_hypothesis || false }}
run_cifuzz: ${{ steps.check.outputs.run_cifuzz || false }}
Expand Down Expand Up @@ -123,6 +124,20 @@ jobs:
id: docs-changes
run: |
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
- name: Get a list of the MSI installer-related files
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 docs changes
if: >-
steps.changed-win-msi-files.outputs.added_modified_renamed != ''
id: win-msi-changes
run: |
echo "run-win-msi=true" >> "${GITHUB_OUTPUT}"
check-docs:
name: Docs
Expand Down Expand Up @@ -218,6 +233,21 @@ jobs:
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: check_source
if: fromJSON(needs.check_source.outputs.run-win-msi)
strategy:
matrix:
arch:
- x86
- x64
- arm64
uses: ./.github/workflows/reusable-windows-msi.yml
with:
arch: ${{ matrix.arch }}

build_macos:
name: 'macOS'
needs: check_source
Expand Down Expand Up @@ -582,6 +612,7 @@ jobs:
- build_ubuntu_ssltests
- build_wasi
- build_windows
- build_windows_msi
- test_hypothesis
- build_asan
- build_tsan
Expand All @@ -596,6 +627,7 @@ jobs:
with:
allowed-failures: >-
build_ubuntu_ssltests,
build_windows_msi,
cifuzz,
test_hypothesis,
allowed-skips: >-
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/build_msi.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/reusable-windows-msi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: TestsMSI

on:
workflow_call:
inputs:
arch:
description: CPU architecture
required: true
type: string

permissions:
contents: read

jobs:
build:
name: installer for ${{ inputs.arch }}
runs-on: windows-latest
timeout-minutes: 60
env:
IncludeFreethreaded: true
steps:
- uses: actions/checkout@v4
- name: Build CPython installer
run: .\Tools\msi\build.bat --doc -${{ inputs.arch }}

0 comments on commit 6ead508

Please sign in to comment.