diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f5fa205ced1..efcac5a65c1 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,29 +17,28 @@ jobs: matrix: # This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes runner: - - macos-11 + - macos-12 - macos-13 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.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.0,name=iPhone 13' + - 'platform=iOS Simulator,OS=17.0,name=iPhone 14' - 'platform=OS X' exclude: # Don't run old macOS with new Xcode - - runner: macos-11 - xcode: Xcode_14.3.1 + - runner: macos-12 + xcode: Xcode_15.0 # Don't run new macOS with old Xcode - runner: macos-13 - xcode: Xcode_13.2.1 + xcode: Xcode_14.0.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 + - 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=16.4,name=iPhone 14' - xcode: Xcode_13.2.1 + - 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 @@ -105,8 +104,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 +138,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/.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/.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..b35fe442acf 100644 --- a/AWSSDKSwiftCLI/Package.swift +++ b/AWSSDKSwiftCLI/Package.swift @@ -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/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 diff --git a/README.md b/README.md index 2225b118020..9b900ecd8de 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 diff --git a/codegen/Package.swift b/codegen/Package.swift index 938635d2612..3378aa90951 100644 --- a/codegen/Package.swift +++ b/codegen/Package.swift @@ -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<CodegenTest>): 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<ProtocolTest>): 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<AwsService>): 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 {