|
67 | 67 | type: string
|
68 | 68 | description: "The command of the nightly main Swift version linux matrix job to execute."
|
69 | 69 |
|
| 70 | + matrix_windows_command: |
| 71 | + type: string |
| 72 | + description: "The command of the current Swift version windows matrix job to execute." |
| 73 | + default: "" |
| 74 | + matrix_windows_6_0_enabled: |
| 75 | + type: boolean |
| 76 | + description: "Boolean to enable the 6.0 Swift version matrix job. Defaults to true." |
| 77 | + default: false |
| 78 | + matrix_windows_6_0_command_override: |
| 79 | + type: string |
| 80 | + description: "The command of the 6.0 Swift version windows matrix job to execute." |
| 81 | + matrix_windows_nightly_6_0_enabled: |
| 82 | + type: boolean |
| 83 | + description: "Boolean to enable the nightly 6.0 Swift version matrix job. Defaults to true." |
| 84 | + default: false |
| 85 | + matrix_windows_nightly_6_0_command_override: |
| 86 | + type: string |
| 87 | + description: "The command of the nightly 6.0 Swift version windows matrix job to execute." |
| 88 | + matrix_windows_nightly_main_enabled: |
| 89 | + type: boolean |
| 90 | + description: "Boolean to enable the nightly main Swift version matrix job. Defaults to true." |
| 91 | + default: false |
| 92 | + matrix_windows_nightly_main_command_override: |
| 93 | + type: string |
| 94 | + description: "The command of the nightly main Swift version windows matrix job to execute." |
| 95 | + |
70 | 96 | # We are cancelling previously triggered workflow runs
|
71 | 97 | concurrency:
|
72 | 98 | group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }}
|
@@ -121,3 +147,64 @@ jobs:
|
121 | 147 | run: |
|
122 | 148 | apt-get -qq update && apt-get -qq -y install curl
|
123 | 149 | curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.sh | bash
|
| 150 | +
|
| 151 | + windows: |
| 152 | + name: Windows (${{ matrix.swift.swift_version }}) |
| 153 | + runs-on: windows-2022 |
| 154 | + if: ${{ inputs.matrix_windows_6_0_enabled }} |
| 155 | + strategy: |
| 156 | + fail-fast: false |
| 157 | + matrix: |
| 158 | + # We are specifying only the major and minor of the docker images to automatically pick up the latest patch release |
| 159 | + swift: |
| 160 | + - image: swift:6.0-windowsservercore-ltsc2022 |
| 161 | + swift_version: "6.0" |
| 162 | + enabled: ${{ inputs.matrix_windows_6_0_enabled }} |
| 163 | + steps: |
| 164 | + - name: Pull Docker image |
| 165 | + if: ${{ matrix.swift.enabled }} |
| 166 | + run: docker pull ${{ matrix.swift.image }} |
| 167 | + - name: Checkout repository |
| 168 | + if: ${{ matrix.swift.enabled }} |
| 169 | + uses: actions/checkout@v4 |
| 170 | + with: |
| 171 | + persist-credentials: false |
| 172 | + - name: Donwload matrix script |
| 173 | + if: ${{ matrix.swift.enabled }} |
| 174 | + run: curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.ps1 -o __check-matrix-job.ps1 |
| 175 | + - name: Run matrix job |
| 176 | + if: ${{ matrix.swift.enabled }} |
| 177 | + run: | |
| 178 | + 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" |
| 179 | +
|
| 180 | + windows-nightly: |
| 181 | + name: Windows (${{ matrix.swift.swift_version }}) |
| 182 | + runs-on: windows-2019 |
| 183 | + if: ${{ inputs.matrix_windows_nightly_6_0_enabled }} && ${{ inputs.matrix_windows_nightly_main_enabled }} |
| 184 | + strategy: |
| 185 | + fail-fast: false |
| 186 | + matrix: |
| 187 | + # We are specifying only the major and minor of the docker images to automatically pick up the latest patch release |
| 188 | + swift: |
| 189 | + - image: swiftlang/swift:nightly-6.0-windowsservercore-1809 |
| 190 | + swift_version: "nightly-6.0" |
| 191 | + enabled: ${{ inputs.matrix_windows_nightly_6_0_enabled }} |
| 192 | + - image: swiftlang/swift:nightly-main-windowsservercore-1809 |
| 193 | + swift_version: "nightly-main" |
| 194 | + enabled: ${{ inputs.matrix_windows_nightly_main_enabled }} |
| 195 | + steps: |
| 196 | + - name: Pull Docker image |
| 197 | + if: ${{ matrix.swift.enabled }} |
| 198 | + run: docker pull ${{ matrix.swift.image }} |
| 199 | + - name: Checkout repository |
| 200 | + if: ${{ matrix.swift.enabled }} |
| 201 | + uses: actions/checkout@v4 |
| 202 | + with: |
| 203 | + persist-credentials: false |
| 204 | + - name: Donwload matrix script |
| 205 | + if: ${{ matrix.swift.enabled }} |
| 206 | + run: curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.ps1 -o __check-matrix-job.ps1 |
| 207 | + - name: Run matrix job |
| 208 | + if: ${{ matrix.swift.enabled }} |
| 209 | + run: | |
| 210 | + docker run --env SWIFT_VERSION="${{ matrix.swift.swift_version }}" --env COMMAND="${{ inputs.matrix_windows_command }}" --env COMMAND_OVERRIDE_NIGHTLY_6_0="${{ inputs.matrix_windows_nightly_6_0_command_override }}" --env COMMAND_OVERRIDE_NIGHTLY_MAIN="${{ inputs.matrix_windows_nightly_main_command_override }}" -v ${{ github.workspace }}:C:\source ${{ matrix.swift.image }} cmd /s /c "swift --version & cd C:\source\ & powershell -File __check-matrix-job.ps1" |
0 commit comments