@@ -175,6 +175,58 @@ jobs:
175
175
echo "${{ steps.set-matrix.outputs.linux-matrix }}"
176
176
echo "${{ steps.set-matrix.outputs.windows-matrix }}"
177
177
echo "${{ steps.set-matrix.outputs.windows-nightly-matrix }}"
178
+ - name : Generate workflow file
179
+ run : |
180
+ {
181
+ echo "name: Matrix
182
+
183
+ on:
184
+ workflow_call
185
+
186
+ concurrency:
187
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }}
188
+ cancel-in-progress: true
189
+
190
+ jobs:
191
+ "
192
+ if [[ ${{ steps.set-matrix.outputs.linux-matrix }} == '{"swift": []}' ]]; then
193
+ echo " linux:
194
+ name: Linux (${\{ matrix.swift.swift_version }})
195
+ runs-on: ubuntu-latest
196
+ strategy:
197
+ fail-fast: false
198
+ matrix: ${{fromJson(steps.set-matrix.outputs.linux-matrix)}}
199
+ container:
200
+ image: ${\{ matrix.swift.image }}
201
+ steps:
202
+ - name: Checkout repository
203
+ uses: actions/checkout@v4
204
+ with:
205
+ persist-credentials: false
206
+ - name: Mark the workspace as safe
207
+ # https://github.com/actions/checkout/issues/766
208
+ run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
209
+ - name: Run matrix job
210
+ env:
211
+ SWIFT_VERSION: ${\{ matrix.swift.swift_version }}
212
+ COMMAND: ${{ inputs.matrix_linux_command }}
213
+ COMMAND_OVERRIDE_5_9: ${{ inputs.matrix_linux_5_9_command_override }}
214
+ COMMAND_OVERRIDE_5_10: ${{ inputs.matrix_linux_5_10_command_override }}
215
+ COMMAND_OVERRIDE_6_0: ${{ inputs.matrix_linux_6_0_command_override }}
216
+ COMMAND_OVERRIDE_NIGHTLY_6_0: ${{ inputs.matrix_linux_nightly_6_0_command_override }}
217
+ COMMAND_OVERRIDE_NIGHTLY_MAIN: ${{ inputs.matrix_linux_nightly_main_command_override }}
218
+ run: |
219
+ apt-get -qq update && apt-get -qq -y install curl
220
+ curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.sh | bash"
221
+ fi
222
+ } >> __matrix_workflow.yml
223
+
224
+ cat __matrix_workflow.yml
225
+
226
+
227
+ call-matrix :
228
+ name : Matrix
229
+ uses : ./__matrix_workflow.yml
178
230
179
231
linux :
180
232
name : Linux (${{ matrix.swift.swift_version }})
0 commit comments