Skip to content

Commit

Permalink
[CI] Fix the Windows 6.0 check name
Browse files Browse the repository at this point in the history
# Motivation

Currently, the Windows 6.0 check name includes the matrix properties.

# Modification

This PR makes it dynamic with the swift version again.

# Result

Aligned CI check names across platforms.
  • Loading branch information
FranzBusch committed Oct 23, 2024
1 parent 6d24ab0 commit 4874873
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true

windows_5_10_enabled:
type: boolean
description: "Boolean to enable the Windows 5.10 Swift version matrix job. Defaults to true."
default: false
windows_6_0_enabled:
type: boolean
description: "Boolean to enable the Windows 6.0 Swift version matrix job. Defaults to true."
Expand All @@ -57,6 +61,7 @@ jobs:
matrix_linux_6_0_enabled: ${{ inputs.linux_6_0_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
matrix_windows_5_10_enabled: ${{ inputs.windows_5_10_enabled }}
matrix_windows_6_0_enabled: ${{ inputs.windows_6_0_enabled }}
matrix_windows_nightly_6_0_enabled: ${{ inputs.windows_nightly_6_0_enabled }}
matrix_windows_nightly_main_enabled: ${{ inputs.windows_nightly_main_enabled }}
5 changes: 5 additions & 0 deletions .github/workflows/cxx_interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true

windows_5_10_enabled:
type: boolean
description: "Boolean to enable the Windows 5.10 Swift version matrix job. Defaults to true."
default: false
windows_6_0_enabled:
type: boolean
description: "Boolean to enable the Windows 6.0 Swift version matrix job. Defaults to true."
Expand All @@ -50,6 +54,7 @@ jobs:
matrix_linux_6_0_enabled: ${{ inputs.linux_6_0_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
matrix_windows_5_10_enabled: ${{ inputs.windows_5_10_enabled }}
matrix_windows_6_0_enabled: ${{ inputs.windows_6_0_enabled }}
matrix_windows_nightly_6_0_enabled: ${{ inputs.windows_nightly_6_0_enabled }}
matrix_windows_nightly_main_enabled: ${{ inputs.windows_nightly_main_enabled }}
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
uses: ./.github/workflows/unit_tests.yml
with:
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/swift_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ on:
type: string
description: "The command of the current Swift version windows matrix job to execute."
default: ""
matrix_windows_5_10_enabled:
type: boolean
description: "Boolean to enable the 5.10 Swift version matrix job. Defaults to true."
default: false
matrix_windows_5_10_command_override:
type: string
description: "The command of the 5.10 Swift version windows matrix job to execute."
matrix_windows_6_0_enabled:
type: boolean
description: "Boolean to enable the 6.0 Swift version matrix job. Defaults to true."
Expand Down Expand Up @@ -149,17 +156,20 @@ jobs:
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.sh | bash
windows:
name: Windows (6.0)
name: Windows (${{ matrix.swift.swift_version }})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
# We are specifying only the major and minor of the docker images to automatically pick up the latest patch release
swift:
- image: swift:5.10-windowsservercore-ltsc2022
swift_version: "5.10"
enabled: ${{ inputs.matrix_windows_5_10_enabled }}
- image: swift:6.0-windowsservercore-ltsc2022
swift_version: "6.0"
enabled: ${{ inputs.matrix_windows_6_0_enabled }}
if: ${{ inputs.matrix_windows_6_0_enabled }}
if: (inputs.matrix_windows_5_10_enabled || inputs.matrix_windows_6_0_enabled)
steps:
- name: Pull Docker image
if: ${{ matrix.swift.enabled }}
Expand All @@ -175,7 +185,7 @@ jobs:
- name: Run matrix job
if: ${{ matrix.swift.enabled }}
run: |
docker run --env SWIFT_VERSION="${{ matrix.swift.swift_version }}" --env COMMAND="${{ inputs.matrix_windows_command }}" --env COMMAND_OVERRIDE_6_0="${{ inputs.matrix_windows_6_0_command_override }}" -v ${{ github.workspace }}:C:\source ${{ matrix.swift.image }} cmd /s /c "swift --version & cd C:\source\ & powershell -File __check-matrix-job.ps1"
docker run --env SWIFT_VERSION="${{ matrix.swift.swift_version }}" --env COMMAND="${{ inputs.matrix_windows_command }}" --env COMMAND_OVERRIDE_5_10="${{ inputs.matrix_windows_5_10_command_override }}" --env COMMAND_OVERRIDE_6_0="${{ inputs.matrix_windows_6_0_command_override }}" -v ${{ github.workspace }}:C:\source ${{ matrix.swift.image }} cmd /s /c "swift --version & cd C:\source\ & powershell -File __check-matrix-job.ps1"
windows-nightly:
name: Windows (${{ matrix.swift.swift_version }})
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ on:
description: "The arguments passed to swift test in the Linux nightly main Swift version matrix job."
default: ""

windows_5_10_enabled:
type: boolean
description: "Boolean to enable the Windows 5.10 Swift version matrix job. Defaults to true."
default: false
windows_5_10_arguments_override:
type: string
description: "The arguments passed to swift test in the Windows 5.10 Swift version matrix job."
default: ""
windows_6_0_enabled:
type: boolean
description: "Boolean to enable the Windows 6.0 Swift version matrix job. Defaults to true."
Expand Down Expand Up @@ -73,7 +81,7 @@ jobs:
unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
uses: ./.github/workflows/swift_matrix.yml
with:
name: "Unit tests"
matrix_linux_command: "swift test"
Expand All @@ -88,6 +96,8 @@ jobs:
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
matrix_linux_nightly_main_command_override: "swift test ${{ inputs.linux_nightly_main_arguments_override }}"
matrix_windows_command: "swift test"
matrix_windows_5_10_enabled: ${{ inputs.windows_5_10_enabled }}
matrix_windows_5_10_command_override: "swift test ${{ inputs.windows_5_10_arguments_override }}"
matrix_windows_6_0_enabled: ${{ inputs.windows_6_0_enabled }}
matrix_windows_6_0_command_override: "swift test ${{ inputs.windows_6_0_arguments_override }}"
matrix_windows_nightly_6_0_enabled: ${{ inputs.windows_nightly_6_0_enabled }}
Expand Down

0 comments on commit 4874873

Please sign in to comment.