@@ -90,10 +90,14 @@ jobs:
90
90
git format-patch "$BASE_COMMIT"..HEAD --stdout
91
91
echo EOF
92
92
} >> "$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
96
96
needs : create_release_commits
97
+ strategy :
98
+ fail-fast : false
99
+ matrix :
100
+ release : [true, false]
97
101
with :
98
102
linux_pre_build_command : |
99
103
git config --global --add safe.directory "$(realpath .)"
@@ -112,36 +116,12 @@ jobs:
112
116
# fatal: empty ident name (for <>) not allowed
113
117
cmd /c "type $env:TEMP\patch.diff | git am || (exit /b 1)"
114
118
# 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 '[email protected] '
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 "[email protected] "
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' }}
141
121
create_tag :
142
122
name : Create Tag
143
123
runs-on : ubuntu-latest
144
- needs : [check_triggering_actor, test_debug , create_release_commits]
124
+ needs : [check_triggering_actor, test , create_release_commits]
145
125
permissions :
146
126
contents : write
147
127
steps :
0 commit comments