| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| name: AWS Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '**' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| # Run for code/build changes and this suite's workflow dependencies. | |
| - '**' | |
| - '!.asf.yaml' | |
| - '!.devcontainer/**' | |
| - '!.github/**' | |
| - '!**/*.md' | |
| - '!dev/**' | |
| - '!mkdocs/**' | |
| - '.github/workflows/aws_test.yml' | |
| - '.github/actions/**' | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| ICEBERG_HOME: /tmp/iceberg | |
| jobs: | |
| aws: | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| name: AWS (${{ matrix.title }}) | |
| runs-on: ${{ matrix.runs-on }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - title: Ubuntu 26.04, S3 + SigV4, bundled AWS SDK | |
| runs-on: ubuntu-26.04 | |
| CC: gcc-14 | |
| CXX: g++-14 | |
| s3: "ON" | |
| sigv4: "ON" | |
| bundle_awssdk: "ON" | |
| - title: Ubuntu 26.04, S3 + SigV4, system AWS SDK | |
| runs-on: ubuntu-26.04 | |
| CC: gcc-14 | |
| CXX: g++-14 | |
| s3: "ON" | |
| sigv4: "ON" | |
| bundle_awssdk: "OFF" | |
| aws-sdk-features: core,config,s3,identity-management,sts,transfer | |
| - title: macOS 26 ARM64, S3, bundled AWS SDK | |
| runs-on: macos-26 | |
| s3: "ON" | |
| sigv4: "OFF" | |
| bundle_awssdk: "ON" | |
| env: | |
| ICEBERG_TEST_S3_URI: s3://iceberg-test | |
| AWS_ACCESS_KEY_ID: admin | |
| AWS_SECRET_ACCESS_KEY: password | |
| AWS_DEFAULT_REGION: us-east-1 | |
| AWS_ENDPOINT_URL: http://127.0.0.1:9000 | |
| AWS_EC2_METADATA_DISABLED: "TRUE" | |
| steps: | |
| - name: Checkout iceberg-cpp | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies on Ubuntu | |
| if: ${{ startsWith(matrix.runs-on, 'ubuntu') }} | |
| shell: bash | |
| run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libssl-dev libjitterentropy3-dev | |
| - name: Cache vcpkg packages | |
| if: ${{ startsWith(matrix.runs-on, 'ubuntu') && matrix.bundle_awssdk == 'OFF' }} | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: vcpkg-cache | |
| with: | |
| path: /usr/local/share/vcpkg/installed | |
| key: vcpkg-x64-linux-aws-sdk-cpp-s3-${{ matrix.s3 }}-sigv4-${{ matrix.sigv4 }}-${{ hashFiles('.github/workflows/aws_test.yml') }} | |
| - name: Install AWS SDK via vcpkg | |
| if: ${{ startsWith(matrix.runs-on, 'ubuntu') && matrix.bundle_awssdk == 'OFF' && steps.vcpkg-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| # Retry to ride out transient GitHub/mirror download failures (504s). | |
| run: | | |
| for attempt in 1 2 3; do | |
| if vcpkg install "aws-sdk-cpp[${{ matrix.aws-sdk-features }}]:x64-linux"; then | |
| exit 0 | |
| fi | |
| echo "::warning::vcpkg install failed (attempt ${attempt}/3), retrying in 30s" | |
| sleep 30 | |
| done | |
| echo "::error::vcpkg install failed after 3 attempts" | |
| exit 1 | |
| - name: Set Ubuntu Compilers | |
| if: ${{ startsWith(matrix.runs-on, 'ubuntu') }} | |
| run: | | |
| echo "CC=${{ matrix.CC }}" >> $GITHUB_ENV | |
| echo "CXX=${{ matrix.CXX }}" >> $GITHUB_ENV | |
| - name: Start Object Store | |
| if: ${{ matrix.s3 == 'ON' }} | |
| shell: bash | |
| run: bash ci/scripts/start_object_store.sh | |
| - name: Set up sccache | |
| uses: ./.github/actions/setup-sccache | |
| with: | |
| key-prefix: sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }} | |
| - name: Build and test Iceberg | |
| shell: bash | |
| env: | |
| CMAKE_TOOLCHAIN_FILE: ${{ startsWith(matrix.runs-on, 'ubuntu') && matrix.bundle_awssdk == 'OFF' && '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake' || '' }} | |
| run: | | |
| ci/scripts/build_iceberg.sh \ | |
| --source-dir "$(pwd)" \ | |
| --build-type Debug \ | |
| --sccache ON \ | |
| --rest-integration-tests OFF \ | |
| --s3 ${{ matrix.s3 }} \ | |
| --sigv4 ${{ matrix.sigv4 }} \ | |
| --bundle-awssdk ${{ matrix.bundle_awssdk }} | |
| - name: Save sccache | |
| if: always() | |
| uses: ./.github/actions/save-sccache | |
| with: | |
| key-prefix: sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }} | |
| job-status: ${{ job.status }} |