Skip to content

Commit 36a63a0

Browse files
committed
workflows: use matrix strategy to configure Swift
This converts the documentation CD pipeline to use a matrix strategy to allow a single configuration point. This also converts the lint CI pipeline to the same mechanism.
1 parent 2d7d5f5 commit 36a63a0

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/documentation.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,22 @@ on:
1212
jobs:
1313
document:
1414
if: ${{ github.repository == 'compnerd/swift-win32' }}
15+
1516
runs-on: windows-latest
1617

18+
strategy:
19+
matrix:
20+
include:
21+
- tag: 5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a
22+
branch: swift-5.5-branch
23+
1724
steps:
1825
- uses: actions/checkout@v2
1926
- uses: seanmiddleditch/gha-setup-vsdevenv@master
2027

21-
- name: Install Swift 5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a
28+
- name: Install Swift ${{ matrix.tag }}
2229
run: |
23-
Install-Binary -Url "https://swift.org/builds/swift-5.5-branch/windows10/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
30+
Install-Binary -Url "https://swift.org/builds/${{ matrix.branch }}/windows10/swift-${{ matrix.tag }}/swift-${{ matrix.tag }}-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
2431
- name: Set Environment Variables
2532
run: |
2633
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

.github/workflows/lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ jobs:
1111
lint:
1212
runs-on: windows-latest
1313

14+
strategy:
15+
matrix:
16+
include:
17+
- tag: 5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a
18+
branch: swift-5.5-branch
19+
1420
steps:
1521
- uses: actions/checkout@v2
1622
- uses: seanmiddleditch/gha-setup-vsdevenv@master
1723

1824
- name: Install Swift 5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a
1925
run: |
20-
Install-Binary -Url "https://swift.org/builds/swift-5.5-branch/windows10/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-05-02-a-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
26+
Install-Binary -Url "https://swift.org/builds/${{ matrix.branch }}/windows10/swift-${{ matrix.tag }}/swift-${{ matrix.tag }}-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
2127
- name: Set Environment Variables
2228
run: |
2329
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

0 commit comments

Comments
 (0)