|
123 | 123 | type: string |
124 | 124 | description: "macOS command to build and test the package" |
125 | 125 | default: "xcrun swift test" |
| 126 | + macos_build_timeout: |
| 127 | + type: number |
| 128 | + description: "The default step timeout in minutes" |
| 129 | + default: 60 |
126 | 130 | ios_pre_build_command: |
127 | 131 | type: string |
128 | 132 | description: "macOS command to execute before building the Swift package for iOS" |
|
131 | 135 | type: string |
132 | 136 | description: "macOS command to build the package for iOS" |
133 | 137 | default: "xcrun swift build --build-tests --sdk \"$(xcrun --sdk iphoneos --show-sdk-path)\" --triple arm64-apple-ios" |
| 138 | + ios_build_timeout: |
| 139 | + type: number |
| 140 | + description: "The default step timeout in minutes" |
| 141 | + default: 60 |
134 | 142 | linux_build_command: |
135 | 143 | type: string |
136 | 144 | description: "Linux command to build and test the package" |
|
166 | 174 | Note that Powershell does not automatically exit if a subcommand fails. The Invoke-Program utility is available to propagate non-zero exit codes. |
167 | 175 | It is strongly encouraged to run all command using `Invoke-Program` unless you want to continue on error eg. `Invoke-Program git apply patch.diff` instead of `git apply patch.diff`. |
168 | 176 | default: "Invoke-Program swift test" |
| 177 | + windows_build_timeout: |
| 178 | + type: number |
| 179 | + description: "The default step timeout in minutes" |
| 180 | + default: 60 |
169 | 181 | macos_env_vars: |
170 | 182 | description: "Newline separated list of environment variables" |
171 | 183 | type: string |
@@ -266,7 +278,7 @@ jobs: |
266 | 278 | run: ${{ inputs.macos_pre_build_command }} |
267 | 279 | - name: Build / Test |
268 | 280 | run: ${{ inputs.macos_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
269 | | - timeout-minutes: 60 |
| 281 | + timeout-minutes: ${{ inputs.macos_build_timeout }} |
270 | 282 |
|
271 | 283 | ios-build: |
272 | 284 | name: iOS (Build Only, Xcode ${{ matrix.xcode_version }} - ${{ matrix.os_version }} - ${{ matrix.arch }}) |
@@ -304,7 +316,7 @@ jobs: |
304 | 316 | run: ${{ inputs.ios_pre_build_command }} |
305 | 317 | - name: Build |
306 | 318 | run: ${{ inputs.ios_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
307 | | - timeout-minutes: 60 |
| 319 | + timeout-minutes: ${{ inputs.ios_build_timeout }} |
308 | 320 |
|
309 | 321 | linux-build: |
310 | 322 | name: Linux (${{ matrix.swift_version }} - ${{ matrix.os_version }} - ${{ matrix.arch }}) |
@@ -786,12 +798,12 @@ jobs: |
786 | 798 | '@ >> $env:TEMP\test-script\run.ps1 |
787 | 799 | # Docker build |
788 | 800 | - name: Docker Build / Test |
789 | | - timeout-minutes: 60 |
| 801 | + timeout-minutes: ${{ inputs.windows_build_timeout }} |
790 | 802 | if: ${{ inputs.enable_windows_docker }} |
791 | 803 | run: | |
792 | 804 | docker run -v ${{ github.workspace }}:C:\source -v $env:TEMP\test-script:C:\test-script ${{ steps.pull_docker_image.outputs.image }} powershell.exe -NoLogo -File C:\test-script\run.ps1 |
793 | 805 | # Docker-less build |
794 | 806 | - name: Build / Test |
795 | | - timeout-minutes: 60 |
| 807 | + timeout-minutes: ${{ inputs.windows_build_timeout }} |
796 | 808 | if: ${{ !inputs.enable_windows_docker }} |
797 | 809 | run: powershell.exe -NoLogo -File $env:TEMP\test-script\run.ps1; exit $LastExitCode |
0 commit comments