Skip to content

Commit a1ab8df

Browse files
authored
Update toolchain and doc for 6.2 (#564)
In preparation for the 2.0.0 GA release, - Update `.swift-version`, `Package.swift` and all examples' `package.swift` to Swift 6.2 - Update all references to `2.0.0-beta.3` to `2.0.0`. This includes the doc and readme, but also the dependencies in the examples `Package.swift`. This will temporary break the build of the examples, until we tag v2.0.0. Note the CI will not be affected as its consumes the local version of the library - [CI] Use Swift-6.2-noble for all testing tasks - Reinstate the script to generate the contributors list and update the list
1 parent 1843cdc commit a1ab8df

File tree

31 files changed

+179
-63
lines changed

31 files changed

+179
-63
lines changed

.github/workflows/integration_tests.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ on:
3838
required: true
3939
matrix_linux_swift_container_image:
4040
type: string
41-
description: "Container image for the matrix job. Defaults to matching latest Swift 6.1 Amazon Linux 2 image."
42-
default: "swiftlang/swift:nightly-6.1-amazonlinux2"
41+
# Note: we don't use Amazon Linux 2 here because zip is not installed by default.
42+
description: "Container image for the matrix test jobs. Defaults to Swift 6.2 on Amazon Linux 2."
43+
default: "swift:6.2-amazonlinux2"
4344

4445
## We are cancelling previously triggered workflow runs
4546
concurrency:
@@ -48,7 +49,7 @@ concurrency:
4849

4950
jobs:
5051
test-examples:
51-
name: Test Examples/${{ matrix.examples }} on ${{ matrix.swift.swift_version }}
52+
name: Test Examples/${{ matrix.examples }} on ${{ matrix.swift.image }}
5253
if: ${{ inputs.examples_enabled }}
5354
runs-on: ubuntu-latest
5455
strategy:
@@ -105,14 +106,17 @@ jobs:
105106
fail-fast: false
106107
matrix:
107108
examples: ${{ fromJson(inputs.archive_plugin_examples) }}
109+
# These must run on Ubuntu and not in a container, because the plugin uses docker
108110
steps:
109111
- name: Checkout repository
110112
uses: actions/checkout@v4
111113
with:
112114
persist-credentials: false
115+
113116
- name: Mark the workspace as safe
114117
# https://github.com/actions/checkout/issues/766
115118
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
119+
116120
- name: Test the archive plugin
117121
env:
118122
EXAMPLE: ${{ matrix.examples }}
@@ -123,14 +127,37 @@ jobs:
123127
name: No dependencies on Foundation
124128
if: ${{ inputs.check_foundation_enabled }}
125129
runs-on: ubuntu-latest
130+
container:
131+
image: ${{ inputs.matrix_linux_swift_container_image }}
126132
steps:
127-
- name: Checkout repository
128-
uses: actions/checkout@v4
129-
with:
130-
persist-credentials: false
133+
# GitHub checkout action has a dep on NodeJS 20 which is not running on Amazonlinux2
134+
# workaround is to manually checkout the repository
135+
# https://github.com/actions/checkout/issues/1487
136+
- name: Manually Clone repository and checkout PR
137+
env:
138+
PR_NUMBER: ${{ github.event.pull_request.number }}
139+
run: |
140+
# Clone the repository
141+
git clone https://github.com/${{ github.repository }}
142+
cd ${{ github.event.repository.name }}
143+
144+
# Fetch the pull request
145+
git fetch origin +refs/pull/$PR_NUMBER/merge:
146+
147+
# Checkout the pull request
148+
git checkout -qf FETCH_HEAD
149+
150+
# - name: Checkout repository
151+
# uses: actions/checkout@v4
152+
# with:
153+
# persist-credentials: false
154+
131155
- name: Mark the workspace as safe
156+
working-directory: ${{ github.event.repository.name }} # until we can use action/checkout@v4
132157
# https://github.com/actions/checkout/issues/766
133158
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
159+
134160
- name: Check for Foundation or ICU dependency
161+
working-directory: ${{ github.event.repository.name }} # until we can use action/checkout@v4
135162
run: |
136163
.github/workflows/scripts/check-link-foundation.sh

.github/workflows/pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
license_header_check_project_name: "SwiftAWSLambdaRuntime"
1313
shell_check_enabled: true
1414
python_lint_check_enabled: true
15-
api_breakage_check_container_image: "swiftlang/swift:nightly-6.1-jammy"
16-
docs_check_container_image: "swift:6.0-noble"
17-
format_check_container_image: "swiftlang/swift:nightly-6.1-jammy"
15+
api_breakage_check_container_image: "swift:6.2-noble"
16+
docs_check_container_image: "swift:6.2-noble"
17+
format_check_container_image: "swift:6.2-noble"
1818
yamllint_check_enabled: true
1919

2020
unit-tests:

.mailmap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ Tomer Doron <[email protected]> <[email protected]>
22
33
44
5-
5+
6+
Sébastien Stormacq <[email protected]> <[email protected]>

CONTRIBUTORS.txt

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,66 @@ needs to be listed here.
88
## COPYRIGHT HOLDERS
99

1010
- Apple Inc. (all contributors with '@apple.com')
11+
- Amazon.com, Inc. or its affiliates (all contributors with '@amazon.com')
1112

1213
### Contributors
1314

1415
- Adam Fowler <[email protected]>
16+
17+
- Alessio Buratti <[email protected]>
1518
- Andrea Scuderi <[email protected]>
19+
1620
- Brendan Kirchner <[email protected]>
1721
- Bryan Bartow <[email protected]>
1822
- Bryan Moffatt <[email protected]>
23+
- Camden Fullmer <[email protected]>
1924
- Christoph Walcher <[email protected]>
2025
- Colton Schlosser <[email protected]>
26+
- Cory Benfield <[email protected]>
27+
- Dmitry Platonov <[email protected]>
28+
- DwayneCoussement <[email protected]>
29+
- DwayneCoussement <[email protected]>
2130
- Eneko Alonso <[email protected]>
22-
- Fabian Fett <[email protected]>
31+
- Fabian Fett <[email protected]>
32+
- Filipp Fediakov <[email protected]>
33+
- Florent Morin <[email protected]>
34+
- Franz Busch <[email protected]>
35+
- Franz Busch <[email protected]>
2336
- George Barnett <[email protected]>
37+
- Jack Rosen <[email protected]>
38+
- Joannis Orlandos <[email protected]>
39+
- Joel Saltzman <[email protected]>
40+
- Johannes Bosecker <[email protected]>
2441
- Johannes Weiss <[email protected]>
42+
43+
- Juan A. Reyes <[email protected]>
44+
- Konrad `ktoso` Malawski <[email protected]>
45+
46+
- Marwane Koutar <[email protected]>
47+
- Matt Massicotte <[email protected]>
2548
- Max Desiatov <[email protected]>
49+
- Natan Rolnik <[email protected]>
2650
- Norman Maurer <[email protected]>
51+
- Paul Toffoloni <[email protected]>
52+
- Ralph Küpper <[email protected]>
2753
54+
- Stefan Nienhuis <[email protected]>
55+
- Sven A. Schmidt <[email protected]>
56+
- Sébastien Stormacq <[email protected]>
57+
- Tim Condon <[email protected]>
58+
2859
- Tomer Doron <[email protected]>
60+
- YR Chen <[email protected]>
61+
- Yim Lee <[email protected]>
2962
- Zhibin Cai <[email protected]>
63+
- aryan-25 <[email protected]>
64+
- dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
65+
- jsonfry <[email protected]>
66+
- mattcorey <[email protected]>
3067
- pmarrufo <[email protected]>
68+
- pokryfka <[email protected]>
69+
- pokryfka <[email protected]>
70+
3171
- tachyonics <[email protected]>
3272

3373
**Updating this list**

Examples/APIGateway+LambdaAuthorizer/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.2
22

33
import PackageDescription
44

@@ -14,7 +14,7 @@ let package = Package(
1414
],
1515
dependencies: [
1616
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
17-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.1"),
17+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0"),
1818
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.0.0"),
1919
],
2020
targets: [

Examples/APIGateway/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.2
22

33
import PackageDescription
44

@@ -13,7 +13,7 @@ let package = Package(
1313
],
1414
dependencies: [
1515
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
16-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.1"),
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0"),
1717
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.0.0"),
1818
],
1919
targets: [

Examples/BackgroundTasks/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.2
22

33
import PackageDescription
44

@@ -13,7 +13,7 @@ let package = Package(
1313
],
1414
dependencies: [
1515
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
16-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.1")
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0")
1717
],
1818
targets: [
1919
.executableTarget(

Examples/CDK/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.2
22

33
import PackageDescription
44

@@ -13,7 +13,7 @@ let package = Package(
1313
],
1414
dependencies: [
1515
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
16-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.1"),
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0"),
1717
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.0.0"),
1818
],
1919
targets: [

Examples/HelloJSON/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.1
1+
// swift-tools-version:6.2
22

33
import PackageDescription
44

@@ -15,7 +15,7 @@ let package = Package(
1515
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
1616
.package(
1717
url: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
18-
from: "2.0.0-beta.1"
18+
from: "2.0.0"
1919
)
2020
],
2121
targets: [

Examples/HelloWorld/Package.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.1
2+
// This example has to be in Swift 6.1 because it is used in the test archive plugin CI job
3+
// That job runs on GitHub's ubuntu-latest environment that only supports Swift 6.1
4+
// https://github.com/actions/runner-images?tab=readme-ov-file
5+
// https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
6+
// We can update to Swift 6.2 when GitHUb hosts will have Swift 6.2
27

38
import PackageDescription
49

@@ -13,7 +18,7 @@ let package = Package(
1318
],
1419
dependencies: [
1520
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
16-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.1")
21+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0")
1722
],
1823
targets: [
1924
.executableTarget(

0 commit comments

Comments
 (0)