-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cb-isolated
- Loading branch information
Showing
138 changed files
with
3,765 additions
and
1,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Matrix Load | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
type: string | ||
description: "The name of the workflow used for the concurrency group." | ||
required: true | ||
matrix_path: | ||
type: string | ||
description: "The path of the test matrix definition." | ||
default: "" | ||
|
||
jobs: | ||
load-matrix: | ||
name: Prepare matrices | ||
runs-on: ubuntu-latest | ||
outputs: | ||
swift-matrix: ${{ steps.load-matrix.outputs.swift-matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Mark the workspace as safe | ||
# https://github.com/actions/checkout/issues/766 | ||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- id: load-matrix | ||
run: | | ||
printf "swift-matrix=%s" "$(jq -c '.' ${{ inputs.matrix_path }})" >> "$GITHUB_OUTPUT" | ||
execute-matrix: | ||
name: Execute matrix | ||
needs: load-matrix | ||
# Workaround https://github.com/nektos/act/issues/1875 | ||
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main | ||
with: | ||
name: ${{ inputs.name }} | ||
matrix_string: '${{ needs.load-matrix.outputs.swift-matrix }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Matrix | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
type: string | ||
description: "The name of the workflow used for the concurrency group." | ||
required: true | ||
matrix_string: | ||
type: string | ||
description: "The test matrix definition." | ||
required: true | ||
|
||
# We will cancel previously triggered workflow runs | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
execute-matrix: | ||
name: ${{ matrix.config.platform }} (${{ matrix.config.name }}) | ||
runs-on: ${{ matrix.config.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(inputs.matrix_string) }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
submodules: true | ||
- name: Pull Docker image | ||
run: docker pull ${{ matrix.config.image }} | ||
- name: Run matrix job | ||
if: ${{ matrix.config.platform != 'Windows' }} | ||
run: | | ||
if [[ -n "${{ matrix.config.setup_command }}" ]]; then | ||
setup_command_expression="${{ matrix.config.setup_command }} &&" | ||
else | ||
setup_command_expression="" | ||
fi | ||
workspace="/$(basename ${{ github.workspace }})" | ||
docker run -v ${{ github.workspace }}:"$workspace" \ | ||
-w "$workspace" \ | ||
-e SWIFT_VERSION="${{ matrix.config.swift_version }}" \ | ||
-e setup_command_expression="$setup_command_expression" \ | ||
-e workspace="$workspace" \ | ||
${{ matrix.config.image }} \ | ||
bash -c "swift --version && git config --global --add safe.directory \"$workspace\" && $setup_command_expression ${{ matrix.config.command }} ${{ matrix.config.command_arguments }}" | ||
- name: Run matrix job (Windows) | ||
if: ${{ matrix.config.platform == 'Windows' }} | ||
run: | | ||
if (-not [string]::IsNullOrEmpty("${{ matrix.config.setup_command }}")) { | ||
$setup_command_expression = "${{ matrix.config.setup_command }} &" | ||
} else { | ||
$setup_command_expression = "" | ||
} | ||
$workspace = "C:\" + (Split-Path ${{ github.workspace }} -Leaf) | ||
docker run -v ${{ github.workspace }}:$($workspace) ` | ||
-w $($workspace) ` | ||
-e SWIFT_VERSION="${{ matrix.config.swift_version }}" ` | ||
-e setup_command_expression=%setup_command_expression% ` | ||
${{ matrix.config.image }} ` | ||
cmd /s /c "swift --version & powershell Invoke-Expression ""$($setup_command_expression) ${{ matrix.config.command }} ${{ matrix.config.command_arguments }}""" | ||
env: | ||
SWIFT_VERSION: ${{ matrix.config.swift_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.