|
59 | 59 | type: string |
60 | 60 | description: "macOS command to build and test the package" |
61 | 61 | default: "xcrun swift test" |
| 62 | + macos_release_build_command: |
| 63 | + type: string |
| 64 | + description: "macOS command to build and test the package" |
| 65 | + default: "xcrun swift test -c release" |
62 | 66 | linux_build_command: |
63 | 67 | type: string |
64 | 68 | description: "Linux command to build and test the package" |
65 | 69 | default: "swift test" |
| 70 | + linux_release_build_command: |
| 71 | + type: string |
| 72 | + description: "Linux command to build and test the package" |
| 73 | + default: "swift test -c release" |
66 | 74 | windows_pre_build_command: |
67 | 75 | type: string |
68 | 76 | description: "Windows Command Prompt command to execute before building the Swift package" |
|
99 | 107 | type: boolean |
100 | 108 | description: "Boolean to enable running build in windows docker container. Defaults to true" |
101 | 109 | default: true |
| 110 | + enable_release_tests: |
| 111 | + type: boolean |
| 112 | + description: "Boolean to enable building and running tests in release mode in addition to the default debug mode. Defaults to true" |
| 113 | + default: true |
102 | 114 | needs_token: |
103 | 115 | type: boolean |
104 | 116 | description: "Boolean to enable providing the GITHUB_TOKEN to downstream job." |
@@ -137,9 +149,12 @@ jobs: |
137 | 149 | run: xcrun swift --version |
138 | 150 | - name: Pre-build |
139 | 151 | run: ${{ inputs.macos_pre_build_command }} |
140 | | - - name: Build / Test |
| 152 | + - name: Build / Test [debug] |
141 | 153 | run: ${{ inputs.macos_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
142 | 154 | timeout-minutes: 60 |
| 155 | + - name: Build / Test [release] |
| 156 | + if: ${{ inputs.enable_release_tests }} |
| 157 | + run: ${{ inputs.macos_release_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
143 | 158 |
|
144 | 159 | linux-build: |
145 | 160 | name: Linux (${{ matrix.swift_version }} - ${{ matrix.os_version }}) |
@@ -174,6 +189,9 @@ jobs: |
174 | 189 | run: ${{ inputs.linux_pre_build_command }} |
175 | 190 | - name: Build / Test |
176 | 191 | run: ${{ inputs.linux_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
| 192 | + - name: Build / Test [release] |
| 193 | + if: ${{ inputs.enable_release_tests }} |
| 194 | + run: ${{ inputs.linux_release_build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} |
177 | 195 |
|
178 | 196 | windows-build: |
179 | 197 | name: Windows (${{ matrix.swift_version }} - ${{ inputs.enable_windows_docker && contains(matrix.swift_version, 'nightly') && 'windows-2019' || 'windows-2022' }}) |
|
0 commit comments