From 2f219f1e3e687b365116a7c67c0fa97802662dad Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 14:45:33 -0400 Subject: [PATCH 01/14] update swift version, macos, and xcode --- .github/workflows/continuous-integration.yml | 35 +++++++------------ .spi.yml | 12 +++---- AWSSDKSwiftCLI/Package.swift | 4 +-- .../Resources/Package.Base.swift | 2 +- Package.swift | 2 +- README.md | 4 +-- codegen/Package.swift | 4 +-- .../build.gradle.kts | 2 +- .../protocol-test-codegen/build.gradle.kts | 2 +- codegen/sdk-codegen/build.gradle.kts | 2 +- .../aws/swift/codegen/TestContextGenerator.kt | 2 +- 11 files changed, 31 insertions(+), 40 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f5fa205ced1..9d11714fc5f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,29 +17,20 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-11 - - macos-13 + - macos-12 + - macos-14 xcode: - # Xcode 13.2.1 is used as oldest because 13.2 is the first version which backports concurrency - - Xcode_13.2.1 - - Xcode_14.3.1 + - Xcode_14.0 + - Xcode_15.0 destination: - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' - 'platform=iOS Simulator,OS=16.4,name=iPhone 14' - 'platform=OS X' exclude: - # Don't run old macOS with new Xcode - - runner: macos-11 - xcode: Xcode_14.3.1 - # Don't run new macOS with old Xcode - - runner: macos-13 - xcode: Xcode_13.2.1 - # Don't run old iOS simulator with new Xcode - - destination: 'platform=iOS Simulator,OS=15.2,name=iPhone 13' - xcode: Xcode_14.3.1 - # Don't run new iOS simulator with old Xcode - - destination: 'platform=iOS Simulator,OS=16.4,name=iPhone 14' - xcode: Xcode_13.2.1 + - runner: macos-12 + xcode: Xcode_15.0 + - runner: macos-14 + xcode: Xcode_14.0 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 @@ -105,8 +96,8 @@ jobs: - focal - amazonlinux2 version: - - 5.5.3 - - 5.8.1 + - 5.7 + - 5.9 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 @@ -139,10 +130,10 @@ jobs: path: | ~/Library/Caches/org.swift.swiftpm ~/.cache/org.swift.swiftpm - key: 1-${{ runner.os }}-swift5.8.1-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }} + key: 1-${{ runner.os }}-swift-${{ matrix.version }}-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }} restore-keys: | - 1-${{ runner.os }}-swift5.8.1-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }} - 1-${{ runner.os }}-swift5.8.1-spm- + 1-${{ runner.os }}-swift-${{ matrix.version }}-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }} + 1-${{ runner.os }}-swift-${{ matrix.version }}-spm- - name: Setup Java uses: actions/setup-java@v3 with: diff --git a/.spi.yml b/.spi.yml index 30024642165..cfd18808248 100644 --- a/.spi.yml +++ b/.spi.yml @@ -6,15 +6,15 @@ builder: - platform: ios target: AWSSTS - platform: linux - swift_version: '5.5' - image: registry.gitlab.com/finestructure/spi-images:basic-5.5-latest + swift_version: '5.7' + image: registry.gitlab.com/finestructure/spi-images:basic-5.7-latest target: AWSSTS - platform: linux - swift_version: '5.6' - image: registry.gitlab.com/finestructure/spi-images:basic-5.6-latest + swift_version: '5.8' + image: registry.gitlab.com/finestructure/spi-images:basic-5.8-latest target: AWSSTS - platform: linux - swift_version: '5.7' - image: registry.gitlab.com/finestructure/spi-images:basic-5.7-latest + swift_version: '5.9' + image: registry.gitlab.com/finestructure/spi-images:basic-5.9-latest target: AWSSTS diff --git a/AWSSDKSwiftCLI/Package.swift b/AWSSDKSwiftCLI/Package.swift index 105501e7bee..18b2f5af93b 100644 --- a/AWSSDKSwiftCLI/Package.swift +++ b/AWSSDKSwiftCLI/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.5 +// swift-tools-version: 5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -27,7 +27,7 @@ let package = Package( .process("Resources/Package.Base.swift") ], swiftSettings: [ - .unsafeFlags(["-package-description-version", "5.5"]) + .unsafeFlags(["-package-description-version", "5.7"]) ] ), .testTarget( diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift index 7c08283530a..6103f7a3a0c 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version:5.7 // // Copyright Amazon.com Inc. or its affiliates. diff --git a/Package.swift b/Package.swift index d4a97b384ac..0e236074fbd 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version:5.7 // // Copyright Amazon.com Inc. or its affiliates. diff --git a/README.md b/README.md index 2225b118020..c90e556f41f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This library is licensed under the Apache 2.0 License. ## Requirements The AWS SDK for Swift supports the following: -- Swift 5.5 or higher +- Swift 5.7 or higher - iOS & iPadOS 13.0 or higher - macOS 10.15 or higher - Ubuntu Linux 16.04 LTS or higher @@ -56,7 +56,7 @@ $ swift package init --type executable 2. Edit your new package's `Package.swift` file to read: ``` -// swift-tools-version: 5.5 +// swift-tools-version: 5.7 import PackageDescription diff --git a/codegen/Package.swift b/codegen/Package.swift index 938635d2612..5b052bf466f 100644 --- a/codegen/Package.swift +++ b/codegen/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5.0 +// swift-tools-version:5.7.0 /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -87,7 +87,7 @@ func appendLibTarget(name: String, path: String) { func appendTstTarget(name: String, path: String, dependency: String) { var dependencies: [Target.Dependency] = [.product(name: "SmithyTestUtil", package: "smithy-swift")] -#if swift(>=5.5) +#if swift(>=5.7) dependencies.append(.byNameItem(name: dependency, condition: nil)) #else dependencies.append(._byNameItem(name: dependency, condition: nil)) diff --git a/codegen/protocol-test-codegen-local/build.gradle.kts b/codegen/protocol-test-codegen-local/build.gradle.kts index 160c6daaa6a..f0a2c58603d 100644 --- a/codegen/protocol-test-codegen-local/build.gradle.kts +++ b/codegen/protocol-test-codegen-local/build.gradle.kts @@ -58,7 +58,7 @@ fun generateSmithyBuild(tests: List): String { "gitRepo": "https://github.com/aws-amplify/smithy-swift.git", "author": "Amazon Web Services", "homepage": "https://docs.amplify.aws/", - "swiftVersion": "5.5.0", + "swiftVersion": "5.7.0", "build": { "rootProject": true } diff --git a/codegen/protocol-test-codegen/build.gradle.kts b/codegen/protocol-test-codegen/build.gradle.kts index d4a955e02ef..00c13664bc1 100644 --- a/codegen/protocol-test-codegen/build.gradle.kts +++ b/codegen/protocol-test-codegen/build.gradle.kts @@ -112,7 +112,7 @@ fun generateSmithyBuild(tests: List): String { "gitRepo": "https://github.com/aws-amplify/smithy-swift.git", "author": "Amazon Web Services", "homepage": "https://docs.amplify.aws/", - "swiftVersion": "5.5.0" + "swiftVersion": "5.7.0" } } }""" diff --git a/codegen/sdk-codegen/build.gradle.kts b/codegen/sdk-codegen/build.gradle.kts index 87b31f8279d..37a1c8bbab2 100644 --- a/codegen/sdk-codegen/build.gradle.kts +++ b/codegen/sdk-codegen/build.gradle.kts @@ -99,7 +99,7 @@ fun generateSmithyBuild(services: List): String { "sdkId": "${service.sdkId}", "author": "Amazon Web Services", "gitRepo": "${service.gitRepo}", - "swiftVersion": "5.5.0", + "swiftVersion": "5.7.0", "build": { "rootProject": $buildStandaloneSdk } diff --git a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/TestContextGenerator.kt b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/TestContextGenerator.kt index e3607354c52..a500af31980 100644 --- a/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/TestContextGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/TestContextGenerator.kt @@ -80,7 +80,7 @@ class TestContextGenerator { .withMember("homepage", Node.from("https://docs.amplify.aws/")) .withMember("author", Node.from("Amazon Web Services")) .withMember("gitRepo", Node.from("https://github.com/awslabs/aws-sdk-swift.git")) - .withMember("swiftVersion", Node.from("5.5.0")) + .withMember("swiftVersion", Node.from("5.7")) .build() } fun listFilesFromManifest(manifest: MockManifest): String { From 7d648c5514bf075dc4c17020a74d7261479fe213 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 15:05:28 -0400 Subject: [PATCH 02/14] update macos version to 13 and drop exclusions --- .github/workflows/continuous-integration.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9d11714fc5f..bf5acf6be5b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,7 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-12 + - macos-13 - macos-14 xcode: - Xcode_14.0 @@ -26,11 +26,6 @@ jobs: - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' - 'platform=iOS Simulator,OS=16.4,name=iPhone 14' - 'platform=OS X' - exclude: - - runner: macos-12 - xcode: Xcode_15.0 - - runner: macos-14 - xcode: Xcode_14.0 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 From d3629f00789f21e860c7fb2ebeb73f4a8fad7d41 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 15:10:52 -0400 Subject: [PATCH 03/14] try macos 12.5 instead of 13 --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index bf5acf6be5b..14192fc25cd 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,7 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-13 + - macos-12.5 - macos-14 xcode: - Xcode_14.0 From 5cdbdfb30e47351fafd71923b815c7a419a52a62 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 15:12:42 -0400 Subject: [PATCH 04/14] bring back exclusion and add macos 13.5 --- .github/workflows/continuous-integration.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 14192fc25cd..002ab779074 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,6 +18,7 @@ jobs: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - macos-12.5 + - macos-13.5 - macos-14 xcode: - Xcode_14.0 @@ -26,6 +27,10 @@ jobs: - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' - 'platform=iOS Simulator,OS=16.4,name=iPhone 14' - 'platform=OS X' + exclude: + # Don't run old macOS with new Xcode + - runner: macos-12.5 + xcode: Xcode_15.0 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 From 6245685e841fd1b9647c240644907749ba616c41 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 15:22:36 -0400 Subject: [PATCH 05/14] remove macos 13.5 check --- .github/workflows/continuous-integration.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 002ab779074..4a7aba33c43 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,7 +18,6 @@ jobs: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - macos-12.5 - - macos-13.5 - macos-14 xcode: - Xcode_14.0 From 9f1ebe282e5bcf85abab39431cdd742694a228f4 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Wed, 27 Sep 2023 16:07:26 -0400 Subject: [PATCH 06/14] update dockerfile for 5.9.0 --- Docker/5.9.0/amazonlinux/2/Dockerfile | 95 +++++++++++++++++++++++ Docker/5.9.0/ubuntu/22.04/Dockerfile | 106 ++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 Docker/5.9.0/amazonlinux/2/Dockerfile create mode 100644 Docker/5.9.0/ubuntu/22.04/Dockerfile diff --git a/Docker/5.9.0/amazonlinux/2/Dockerfile b/Docker/5.9.0/amazonlinux/2/Dockerfile new file mode 100644 index 00000000000..6b2c669ceb9 --- /dev/null +++ b/Docker/5.9.0/amazonlinux/2/Dockerfile @@ -0,0 +1,95 @@ +FROM swift:5.9-amazonlinux2 + +# Install Open SSL -- dependency of CRT +RUN yum -y install openssl-devel + +## The rest of this file is from https://github.com/aws/aws-codebuild-docker-images/blob/master/al2/x86_64/standard/4.0/Dockerfile + +# Install other utilities +RUN yum install -y -q \ + wget unzip + +## Install Java + +#**************** JAVA **************************************************** + +ENV JAVA_17_HOME="/usr/lib/jvm/java-17-amazon-corretto.x86_64" \ + JDK_17_HOME="/usr/lib/jvm/java-17-amazon-corretto.x86_64" \ + JRE_17_HOME="/usr/lib/jvm/java-17-amazon-corretto.x86_64" \ + ANT_VERSION=1.10.12 \ + MAVEN_HOME="/opt/maven" \ + MAVEN_VERSION=3.8.7 \ + INSTALLED_GRADLE_VERSIONS="7.6" \ + GRADLE_VERSION=7.6 \ + SBT_VERSION=1.8.2 \ + GRADLE_PATH="$SRC_DIR/gradle" \ + ANT_DOWNLOAD_SHA512="2287dc5cfc21043c14e5413f9afb1c87c9f266ec2a9ba2d3bf2285446f6e4ccb59b558bf2e5c57911a05dfa293c7d5c7ad60ac9f744ba11406f4e6f9a27b2403" \ + MAVEN_DOWNLOAD_SHA512="21c2be0a180a326353e8f6d12289f74bc7cd53080305f05358936f3a1b6dd4d91203f4cc799e81761cf5c53c5bbe9dcc13bdb27ec8f57ecf21b2f9ceec3c8d27" \ + GRADLE_DOWNLOADS_SHA256="312eb12875e1747e05c2f81a4789902d7e4ec5defbd1eefeaccc08acf096505d 7.6" \ + SBT_DOWNLOAD_SHA256="1f65344da074dbd66dfefa93c0eff8d319d772e5cad47fcbeb6ae178bbdf4686" \ + LOG4J_UNSAFE_VERSIONS="2.11.1 1.2.8" + +ARG MAVEN_CONFIG_HOME="/root/.m2" +ENV JAVA_HOME="$JAVA_17_HOME" \ + JDK_HOME="$JDK_17_HOME" \ + JRE_HOME="$JRE_17_HOME" + +RUN set -x \ + # Install Amazon Corretto 17 + && rpm --import https://yum.corretto.aws/corretto.key \ + && curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ + && yum install -y -q java-17-amazon-corretto java-17-amazon-corretto-devel \ + && update-ca-trust \ + && for tool_path in $JAVA_HOME/bin/*; do \ + tool=`basename $tool_path`; \ + update-alternatives --install /usr/bin/$tool $tool $tool_path 10000; \ + update-alternatives --set $tool $tool_path; \ + done \ + && rm $JAVA_HOME/lib/security/cacerts && ln -s /etc/pki/java/cacerts $JAVA_HOME/lib/security/cacerts \ + # Install Ant + && curl -LSso /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz \ + && echo "$ANT_DOWNLOAD_SHA512 /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz" | sha512sum -c - \ + && tar -xzf /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz -C /opt \ + && rm /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/ant ant /opt/apache-ant-$ANT_VERSION/bin/ant 10000 + +RUN set -ex \ + # Install Maven + && mkdir -p $MAVEN_HOME \ + && curl -LSso /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && echo "$MAVEN_DOWNLOAD_SHA512 /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz" | sha512sum -c - \ + && tar xzf /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz -C $MAVEN_HOME --strip-components=1 \ + && rm /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 10000 \ + && mkdir -p $MAVEN_CONFIG_HOME \ + # Install Gradle + && mkdir -p $GRADLE_PATH \ + && for version in $INSTALLED_GRADLE_VERSIONS; do { \ + wget -q "https://services.gradle.org/distributions/gradle-$version-all.zip" -O "$GRADLE_PATH/gradle-$version-all.zip" \ + && unzip -q "$GRADLE_PATH/gradle-$version-all.zip" -d /usr/local \ + && echo -e "$GRADLE_DOWNLOADS_SHA256" | grep "$version" | sed "s|$version|$GRADLE_PATH/gradle-$version-all.zip|" | sha256sum -c - \ + && rm "$GRADLE_PATH/gradle-$version-all.zip" \ + && mkdir "/tmp/gradle-$version" \ + && "/usr/local/gradle-$version/bin/gradle" -p "/tmp/gradle-$version" init \ + && "/usr/local/gradle-$version/bin/gradle" -p "/tmp/gradle-$version" wrapper \ + # Android Studio uses the "-all" distribution for it's wrapper script. + && perl -pi -e "s/gradle-$version-bin.zip/gradle-$version-all.zip/" "/tmp/gradle-$version/gradle/wrapper/gradle-wrapper.properties" \ + && "/tmp/gradle-$version/gradlew" -p "/tmp/gradle-$version" init \ + && rm -rf "/tmp/gradle-$version" \ + && if [ "$version" != "$GRADLE_VERSION" ]; then rm -rf "/usr/local/gradle-$version"; fi; \ + }; done \ + # Install default GRADLE_VERSION to path + && ln -s /usr/local/gradle-$GRADLE_VERSION/bin/gradle /usr/bin/gradle \ + && rm -rf $GRADLE_PATH \ + # Install SBT + && curl -fSL "https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz" -o sbt.tgz \ + && echo "${SBT_DOWNLOAD_SHA256} *sbt.tgz" | sha256sum -c - \ + && tar xzf sbt.tgz -C /usr/local/bin/ \ + && rm sbt.tgz \ + && for version in $LOG4J_UNSAFE_VERSIONS; do find / -name log4j*-$version.jar | xargs rm -f; done + +ENV PATH "/usr/local/bin/sbt/bin:$PATH" +RUN sbt version -Dsbt.rootdir=true +# Cleanup +RUN rm -fr /tmp/* /var/tmp/* +#**************** END JAVA **************************************************** \ No newline at end of file diff --git a/Docker/5.9.0/ubuntu/22.04/Dockerfile b/Docker/5.9.0/ubuntu/22.04/Dockerfile new file mode 100644 index 00000000000..b21529a68ba --- /dev/null +++ b/Docker/5.9.0/ubuntu/22.04/Dockerfile @@ -0,0 +1,106 @@ +FROM swift:5.9-jammy + +# Install Open SSL -- dependency of CRT +RUN apt-get -q update && \ + apt-get -q install -y libssl-dev + +## The rest of this file is from https://github.com/aws/aws-codebuild-docker-images/blob/master/ubuntu/standard/5.0/Dockerfile + +# Install other utilities +RUN apt-get install -y -qq --no-install-recommends \ + curl unzip wget + +## Install Java + +#**************** JAVA **************************************************** +ENV JAVA_17_HOME="/usr/lib/jvm/java-17-amazon-corretto" \ + JDK_17_HOME="/usr/lib/jvm/java-17-amazon-corretto" \ + JRE_17_HOME="/usr/lib/jvm/java-17-amazon-corretto" +ARG ANT_VERSION=1.10.12 +ARG MAVEN_HOME="/opt/maven" +ARG MAVEN_VERSION=3.8.7 +ARG INSTALLED_GRADLE_VERSIONS="7.6" +ARG GRADLE_VERSION=7.6 +ARG SBT_VERSION=1.8.2 +ARG GRADLE_PATH="$SRC_DIR/gradle" +ARG ANT_DOWNLOAD_SHA512="2287dc5cfc21043c14e5413f9afb1c87c9f266ec2a9ba2d3bf2285446f6e4ccb59b558bf2e5c57911a05dfa293c7d5c7ad60ac9f744ba11406f4e6f9a27b2403" +ARG MAVEN_DOWNLOAD_SHA512="21c2be0a180a326353e8f6d12289f74bc7cd53080305f05358936f3a1b6dd4d91203f4cc799e81761cf5c53c5bbe9dcc13bdb27ec8f57ecf21b2f9ceec3c8d27" +ARG GRADLE_DOWNLOADS_SHA256="312eb12875e1747e05c2f81a4789902d7e4ec5defbd1eefeaccc08acf096505d 7.6" +ARG SBT_DOWNLOAD_SHA256="1f65344da074dbd66dfefa93c0eff8d319d772e5cad47fcbeb6ae178bbdf4686" +ENV LOG4J_UNSAFE_VERSIONS="2.11.1 1.2.8" + +ARG MAVEN_CONFIG_HOME="/root/.m2" + +ENV JAVA_HOME="$JAVA_17_HOME" \ + JDK_HOME="$JDK_17_HOME" \ + JRE_HOME="$JRE_17_HOME" + +ENV PATH="${PATH}:/opt/tools" + +RUN set -ex \ + && apt-get update \ + && apt-get install -y -qq software-properties-common apt-utils \ + # Install Corretto 17 + && wget -qO- https://apt.corretto.aws/corretto.key | apt-key add - \ + && add-apt-repository 'deb https://apt.corretto.aws stable main' \ + && apt-get update \ + && apt-get install -y -qq java-17-amazon-corretto-jdk \ + && apt-get install -y -qq --no-install-recommends ca-certificates-java \ + # Ensure Java cacerts symlink points to valid location + && update-ca-certificates -f \ + && dpkg --add-architecture i386 \ + && apt-get update \ + && for tool_path in $JAVA_HOME/bin/*; do \ + tool=`basename $tool_path`; \ + update-alternatives --install /usr/bin/$tool $tool $tool_path 10000; \ + update-alternatives --set $tool $tool_path; \ + done \ + && rm $JAVA_HOME/lib/security/cacerts && ln -s /etc/ssl/certs/java/cacerts $JAVA_HOME/lib/security/cacerts \ + # Install Ant + && curl -LSso /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz \ + && echo "$ANT_DOWNLOAD_SHA512 /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz" | sha512sum -c - \ + && tar -xzf /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz -C /opt \ + && rm /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/ant ant /opt/apache-ant-$ANT_VERSION/bin/ant 10000 + +RUN set -ex \ + # Install Maven + && mkdir -p $MAVEN_HOME \ + && curl -LSso /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && echo "$MAVEN_DOWNLOAD_SHA512 /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz" | sha512sum -c - \ + && tar xzf /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz -C $MAVEN_HOME --strip-components=1 \ + && rm /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 10000 \ + && mkdir -p $MAVEN_CONFIG_HOME \ + # Install Gradle + && mkdir -p $GRADLE_PATH \ + && for version in $INSTALLED_GRADLE_VERSIONS; do { \ + wget -q "https://services.gradle.org/distributions/gradle-$version-all.zip" -O "$GRADLE_PATH/gradle-$version-all.zip" \ + && unzip -q "$GRADLE_PATH/gradle-$version-all.zip" -d /usr/local \ + && echo "$GRADLE_DOWNLOADS_SHA256" | grep "$version" | sed "s|$version|$GRADLE_PATH/gradle-$version-all.zip|" | sha256sum -c - \ + && rm "$GRADLE_PATH/gradle-$version-all.zip" \ + && mkdir "/tmp/gradle-$version" \ + && "/usr/local/gradle-$version/bin/gradle" -p "/tmp/gradle-$version" init \ + && "/usr/local/gradle-$version/bin/gradle" -p "/tmp/gradle-$version" wrapper \ + # Android Studio uses the "-all" distribution for it's wrapper script. + && perl -pi -e "s/gradle-$version-bin.zip/gradle-$version-all.zip/" "/tmp/gradle-$version/gradle/wrapper/gradle-wrapper.properties" \ + && "/tmp/gradle-$version/gradlew" -p "/tmp/gradle-$version" init \ + && rm -rf "/tmp/gradle-$version" \ + && if [ "$version" != "$GRADLE_VERSION" ]; then rm -rf "/usr/local/gradle-$version"; fi; \ + }; done \ + # Install default GRADLE_VERSION to path + && ln -s /usr/local/gradle-$GRADLE_VERSION/bin/gradle /usr/bin/gradle \ + && rm -rf $GRADLE_PATH \ + # Install SBT + && curl -fSL "https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz" -o sbt.tgz \ + && echo "${SBT_DOWNLOAD_SHA256} *sbt.tgz" | sha256sum -c - \ + && tar xzf sbt.tgz -C /usr/local/bin/ \ + && rm sbt.tgz \ + && for version in $LOG4J_UNSAFE_VERSIONS; do find / -name log4j*-$version.jar | xargs rm -f; done + +ENV PATH "/usr/local/bin/sbt/bin:$PATH" +RUN sbt version -Dsbt.rootdir=true +# Cleanup +RUN rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && apt-get clean +#**************** END JAVA **************************************************** \ No newline at end of file From 62d1940eec734789cf000fc9b6e597f8d21d349a Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 13:37:51 -0400 Subject: [PATCH 07/14] macos-13 works with xcode15 and macos-14 is not yet supported --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4a7aba33c43..bd32e647edf 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,7 +18,7 @@ jobs: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - macos-12.5 - - macos-14 + - macos-13 xcode: - Xcode_14.0 - Xcode_15.0 From f3e13ab7a2eeea3167f86bb4b4b8137ff073085b Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 14:07:31 -0400 Subject: [PATCH 08/14] use 14.3.1 instead of 14.0 --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index bd32e647edf..d29f1bccf37 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -20,7 +20,7 @@ jobs: - macos-12.5 - macos-13 xcode: - - Xcode_14.0 + - Xcode_14.3.1 - Xcode_15.0 destination: - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' From ec9385c1763e2530b0831c6fef52b765d908b08d Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 14:42:15 -0400 Subject: [PATCH 09/14] update versions and exclusions --- .github/workflows/continuous-integration.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d29f1bccf37..e4c593b8c8f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,10 +17,10 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-12.5 + - macos-12 - macos-13 xcode: - - Xcode_14.3.1 + - Xcode_14.0.1 - Xcode_15.0 destination: - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' @@ -28,8 +28,11 @@ jobs: - 'platform=OS X' exclude: # Don't run old macOS with new Xcode - - runner: macos-12.5 + - runner: macos-12 xcode: Xcode_15.0 + # Don't run new macOS with old Xcode + - runner: macos-13 + xcode: Xcode_14.0.1 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 From e7a85485faabd3548f9de9f55fd9dfa5001157d4 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 14:59:57 -0400 Subject: [PATCH 10/14] update macos-12 to 12.5 --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e4c593b8c8f..4ce94d24a83 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,7 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-12 + - macos-12.5 - macos-13 xcode: - Xcode_14.0.1 From cc758b17bccff13fa5f4d144ccf4456f01ed1576 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 15:02:24 -0400 Subject: [PATCH 11/14] update exclusion --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4ce94d24a83..4398731d07a 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -28,7 +28,7 @@ jobs: - 'platform=OS X' exclude: # Don't run old macOS with new Xcode - - runner: macos-12 + - runner: macos-12.5 xcode: Xcode_15.0 # Don't run new macOS with old Xcode - runner: macos-13 From 2734f496c717627d049629ef6dbfce796be04885 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 15:06:00 -0400 Subject: [PATCH 12/14] revert back to 12 --- .github/workflows/continuous-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4398731d07a..e4c593b8c8f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,7 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-12.5 + - macos-12 - macos-13 xcode: - Xcode_14.0.1 @@ -28,7 +28,7 @@ jobs: - 'platform=OS X' exclude: # Don't run old macOS with new Xcode - - runner: macos-12.5 + - runner: macos-12 xcode: Xcode_15.0 # Don't run new macOS with old Xcode - runner: macos-13 From 02bc9afc27b60e1c51a8bfc76bfd341620596697 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 16:22:03 -0400 Subject: [PATCH 13/14] update iOS versions --- .github/workflows/continuous-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e4c593b8c8f..7dcb08b871e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -23,8 +23,8 @@ jobs: - Xcode_14.0.1 - Xcode_15.0 destination: - - 'platform=iOS Simulator,OS=15.2,name=iPhone 13' - - 'platform=iOS Simulator,OS=16.4,name=iPhone 14' + - 'platform=iOS Simulator,OS=16.2,name=iPhone 13' + - 'platform=iOS Simulator,OS=17.0,name=iPhone 14' - 'platform=OS X' exclude: # Don't run old macOS with new Xcode From f290ccc2e9cfcddfb4c6ac926ce9bc47f8baf583 Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Thu, 28 Sep 2023 19:12:47 -0400 Subject: [PATCH 14/14] fix iOS versions & exclusions + revert swift-tools-version --- .github/workflows/continuous-integration.yml | 8 +++++++- .github/workflows/model-integration.yml | 2 +- AWSSDKSwiftCLI/Package.swift | 2 +- .../Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift | 2 +- Package.swift | 2 +- README.md | 2 +- codegen/Package.swift | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7dcb08b871e..efcac5a65c1 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -23,7 +23,7 @@ jobs: - Xcode_14.0.1 - Xcode_15.0 destination: - - 'platform=iOS Simulator,OS=16.2,name=iPhone 13' + - 'platform=iOS Simulator,OS=16.0,name=iPhone 13' - 'platform=iOS Simulator,OS=17.0,name=iPhone 14' - 'platform=OS X' exclude: @@ -33,6 +33,12 @@ jobs: # Don't run new macOS with old Xcode - runner: macos-13 xcode: Xcode_14.0.1 + # Don't run old iOS simulator with new Xcode + - destination: 'platform=iOS Simulator,OS=16.0,name=iPhone 13' + xcode: Xcode_15.0 + # Don't run new iOS simulator with old Xcode + - destination: 'platform=iOS Simulator,OS=17.0,name=iPhone 14' + xcode: Xcode_14.0.1 steps: - name: Checkout aws-sdk-swift uses: actions/checkout@v3 diff --git a/.github/workflows/model-integration.yml b/.github/workflows/model-integration.yml index 7ee77af2578..8265b28bc94 100644 --- a/.github/workflows/model-integration.yml +++ b/.github/workflows/model-integration.yml @@ -19,7 +19,7 @@ on: jobs: model-integration: runs-on: ubuntu-latest - container: swift:5.8-jammy + container: swift:5.9-jammy env: AWS_SWIFT_SDK_USE_LOCAL_DEPS: 1 steps: diff --git a/AWSSDKSwiftCLI/Package.swift b/AWSSDKSwiftCLI/Package.swift index 18b2f5af93b..b35fe442acf 100644 --- a/AWSSDKSwiftCLI/Package.swift +++ b/AWSSDKSwiftCLI/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.7 +// swift-tools-version: 5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift index 6103f7a3a0c..7c08283530a 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.5 // // Copyright Amazon.com Inc. or its affiliates. diff --git a/Package.swift b/Package.swift index 0e236074fbd..d4a97b384ac 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.5 // // Copyright Amazon.com Inc. or its affiliates. diff --git a/README.md b/README.md index c90e556f41f..9b900ecd8de 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ $ swift package init --type executable 2. Edit your new package's `Package.swift` file to read: ``` -// swift-tools-version: 5.7 +// swift-tools-version: 5.5 import PackageDescription diff --git a/codegen/Package.swift b/codegen/Package.swift index 5b052bf466f..3378aa90951 100644 --- a/codegen/Package.swift +++ b/codegen/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7.0 +// swift-tools-version:5.5.0 /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.