Skip to content

Commit ca9adf7

Browse files
committed
Fix support for amazonlinux2 with the swift_package_test workflow
checkout@v4 requires a version of node that requires a newer version of glibc than exists on this OS version, so downgrade it to v1 for AL2.
1 parent 1f5e7cd commit ca9adf7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: ./.github/workflows/swift_package_test.yml
2525
with:
2626
# Linux
27-
linux_os_versions: '["jammy", "rhel-ubi9"]'
27+
linux_os_versions: '["jammy", "rhel-ubi9", "amazonlinux2"]'
2828
linux_build_command: |
2929
mkdir MyPackage
3030
cd MyPackage

.github/workflows/swift_package_test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ jobs:
200200
run: swift --version
201201
- name: Checkout repository
202202
uses: actions/checkout@v4
203+
if: ${{ matrix.os_version != 'amazonlinux2' }}
204+
- name: Checkout repository
205+
uses: actions/checkout@v1
206+
if: ${{ matrix.os_version == 'amazonlinux2' }}
203207
- name: Provide token
204208
if: ${{ inputs.needs_token }}
205209
run: |
@@ -232,6 +236,10 @@ jobs:
232236
run: swift --version
233237
- name: Checkout repository
234238
uses: actions/checkout@v4
239+
if: ${{ matrix.os_version != 'amazonlinux2' }}
240+
- name: Checkout repository
241+
uses: actions/checkout@v1
242+
if: ${{ matrix.os_version == 'amazonlinux2' }}
235243
- name: Provide token
236244
if: ${{ inputs.needs_token }}
237245
run: |
@@ -272,6 +280,10 @@ jobs:
272280
run: swift --version
273281
- name: Checkout repository
274282
uses: actions/checkout@v4
283+
if: ${{ matrix.os_version != 'amazonlinux2' }}
284+
- name: Checkout repository
285+
uses: actions/checkout@v1
286+
if: ${{ matrix.os_version == 'amazonlinux2' }}
275287
- name: Provide token
276288
if: ${{ inputs.needs_token }}
277289
run: |

0 commit comments

Comments
 (0)