@@ -90,10 +90,14 @@ jobs:
9090 git format-patch "$BASE_COMMIT"..HEAD --stdout
9191 echo EOF
9292 } >> "$GITHUB_OUTPUT"
93- test_debug :
94- name : Test in Debug configuration
95- uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@windows-pre-build
93+ test :
94+ name : Test in ${{ matrix.release && 'Release' || ' Debug' }} configuration
95+ uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
9696 needs : create_release_commits
97+ strategy :
98+ fail-fast : false
99+ matrix :
100+ release : [true, false]
97101 with :
98102 linux_pre_build_command : |
99103 git config --global --add safe.directory "$(realpath .)"
@@ -112,36 +116,12 @@ jobs:
112116 # fatal: empty ident name (for <>) not allowed
113117 cmd /c "type $env:TEMP\patch.diff | git am || (exit /b 1)"
114118 # We require that releases of swift-format build without warnings
115- linux_build_command : swift test -Xswiftc -warnings-as-errors
116- windows_build_command : swift test -Xswiftc -warnings-as-errors
117- test_release :
118- name : Test in Release configuration
119- uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@windows-pre-build
120- needs : create_release_commits
121- with :
122- linux_pre_build_command : |
123- git config --global --add safe.directory "$(realpath .)"
124- git config --local user.name 'swift-ci'
125- git config --local user.email 'swift-ci@users.noreply.github.com'
126- git am << EOF
127- ${{ needs.create_release_commits.outputs.release_commit_patch }}
128- EOF
129- windows_pre_build_command : |
130- git config --local user.name "swift-ci"
131- git config --local user.email "swift-ci@users.noreply.github.com"
132- echo @"
133- ${{ needs.create_release_commits.outputs.release_commit_patch }}
134- "@ > $env:TEMP\patch.diff
135- # For some reason `git am` fails in Powershell with the following error. Executing it in cmd works...
136- # fatal: empty ident name (for <>) not allowed
137- cmd /c "type $env:TEMP\patch.diff | git am || (exit /b 1)"
138- # We require that releases of swift-format build without warnings
139- linux_build_command : swift test -Xswiftc -warnings-as-errors
140- windows_build_command : swift test -Xswiftc -warnings-as-errors
119+ linux_build_command : swift test -Xswiftc -warnings-as-errors ${{ matrix.release && '-c release' }}
120+ windows_build_command : swift test -Xswiftc -warnings-as-errors ${{ matrix.release && '-c release' }}
141121 create_tag :
142122 name : Create Tag
143123 runs-on : ubuntu-latest
144- needs : [check_triggering_actor, test_debug , create_release_commits]
124+ needs : [check_triggering_actor, test , create_release_commits]
145125 permissions :
146126 contents : write
147127 steps :
0 commit comments