diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b050b7319..38d202267 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,14 @@ on: - 'main' env: - BUILDER_VERSION: v0.8.18 + BUILDER_VERSION: v0.9.1 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-crt-swift - LINUX_BASE_IMAGE: ubuntu-16-x64 RUN: ${{ github.run_id }}-${{ github.run_number }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: us-east-1 jobs: lint: @@ -32,81 +34,39 @@ jobs: uses: norio-nomura/action-swiftlint@3.1.0 env: DIFF_BASE: ${{ github.base_ref }} - ubuntu: + linux: runs-on: ubuntu-latest strategy: matrix: image: - - aws-crt-swift-5-ubuntu-16-x64 + - ubuntu-x64 + - al2-x64 + - centos-x64 steps: - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - name: Build ${{ env.PACKAGE_NAME }} run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin - export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/${{ matrix.image }}:${{ env.BUILDER_VERSION }} - docker pull $DOCKER_IMAGE - docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --build-dir=/root/${{ env.PACKAGE_NAME }} --spec=downstream - al2: - runs-on: ubuntu-latest - strategy: - matrix: - image: - - aws-crt-swift-5-al2-x64 - steps: - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - - name: Build ${{ env.PACKAGE_NAME }} + consumers - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin - export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/${{ matrix.image }}:${{ env.BUILDER_VERSION }} - docker pull $DOCKER_IMAGE - docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --build-dir=/root/${{ env.PACKAGE_NAME }} --spec=downstream - centos: - runs-on: ubuntu-latest - strategy: - matrix: - image: - - aws-crt-swift-5-centos-x64 - steps: - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - - name: Build ${{ env.PACKAGE_NAME }} - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin - export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/${{ matrix.image }}:${{ env.BUILDER_VERSION }} - docker pull $DOCKER_IMAGE - docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --build-dir=/root/${{ env.PACKAGE_NAME }} --spec=downstream + aws s3 cp --debug s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh + ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-swift-5-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} osx: runs-on: macos-11 steps: - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" chmod a+x builder - ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream - ios: + ./builder build -p ${{ env.PACKAGE_NAME }} + devices: runs-on: macos-11 + strategy: + fail-fast: false + matrix: + target: + - ios + - tvos + - watchos steps: - - name: Checkout Sources - uses: actions/checkout@v2 - with: - submodules: true - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" chmod a+x builder - ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream --target=ios-armv8 + ./builder build -p ${{ env.PACKAGE_NAME }} --target=${{ matrix.target }}-armv8 diff --git a/Package.swift b/Package.swift index deb47f311..855aed698 100644 --- a/Package.swift +++ b/Package.swift @@ -7,11 +7,11 @@ let excludesFromAll = ["tests", "cmake", "CONTRIBUTING.md", var packageTargets: [Target] = [] var package = Package(name: "AwsCrt", - platforms: [.iOS(.v11), .macOS(.v10_14)], - products: [ - .library(name: "AwsCommonRuntimeKit", targets: ["AwsCommonRuntimeKit"]), - .executable(name: "Elasticurl", targets: ["Elasticurl"]) - ] + platforms: [.iOS(.v13), .macOS(.v10_14), .tvOS(.v13), .watchOS(.v5)], + products: [ + .library(name: "AwsCommonRuntimeKit", targets: ["AwsCommonRuntimeKit"]), + .executable(name: "Elasticurl", targets: ["Elasticurl"]) + ] ) var calDependencies: [Target.Dependency] = ["AwsCCommon"] diff --git a/aws-common-runtime/s2n b/aws-common-runtime/s2n index 875ddd026..3b8e5aaab 160000 --- a/aws-common-runtime/s2n +++ b/aws-common-runtime/s2n @@ -1 +1 @@ -Subproject commit 875ddd026c5cad73dd3a34a9026fbbade38d292b +Subproject commit 3b8e5aaab4c8617fea77786837dc0eab93c14aa8 diff --git a/builder.json b/builder.json index 7741799a7..771f46bf5 100644 --- a/builder.json +++ b/builder.json @@ -10,9 +10,6 @@ "swift test" ], "hosts": { - "ubuntu": {}, - "macos": {}, - "al2": {}, "al2012": { "enabled": false }, @@ -29,6 +26,16 @@ "xcodebuild -scheme AwsCommonRuntimeKit -destination 'generic/platform=iOS'" ] }, + "tvos": { + "!build_steps": [ + "xcodebuild -scheme AwsCommonRuntimeKit -destination 'generic/platform=tvOS'" + ] + }, + "watchos": { + "!build_steps": [ + "xcodebuild -scheme AwsCommonRuntimeKit -destination 'generic/platform=watchOS'" + ] + }, "macos": { "!test_steps": [ "./integ_test.sh"