-
Notifications
You must be signed in to change notification settings - Fork 113
214 lines (207 loc) · 8.73 KB
/
Copy pathaws_test.yml
File metadata and controls
214 lines (207 loc) · 8.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# 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]
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: minio
AWS_SECRET_ACCESS_KEY: minio123
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: http://127.0.0.1:9000
AWS_EC2_METADATA_DISABLED: "TRUE"
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: "2G"
steps:
- name: Checkout iceberg-cpp
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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 libjitterentropy3-dev
- name: Cache vcpkg packages
if: ${{ startsWith(matrix.runs-on, 'ubuntu') && matrix.bundle_awssdk == 'OFF' }}
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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 MinIO
if: ${{ matrix.s3 == 'ON' }}
shell: bash
run: bash ci/scripts/start_minio.sh
- name: Restore sccache cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }}-${{ github.run_id }}
restore-keys: |
sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }}-
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- 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 "$(pwd)" OFF ON ${{ matrix.s3 }} ${{ matrix.sigv4 }} ${{ matrix.bundle_awssdk }}
- name: Show sccache stats
shell: bash
run: sccache --show-stats
- name: Save sccache cache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }}-${{ github.run_id }}
# Exercise the Meson build with SigV4 enabled (resolves aws-cpp-sdk-core via
# its CMake config, not pkg-config whose Cflags force -std=c++11).
meson-sigv4:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
name: Meson SigV4 (AMD64 Ubuntu 26.04)
runs-on: ubuntu-26.04
timeout-minutes: 45
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: "2G"
steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Checkout iceberg-cpp
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install build dependencies
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libjitterentropy3-dev
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
- name: Cache vcpkg packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: vcpkg-cache
with:
path: /usr/local/share/vcpkg/installed
key: vcpkg-x64-linux-aws-sdk-cpp-core-${{ hashFiles('.github/workflows/aws_test.yml') }}
- name: Install AWS SDK via vcpkg
if: ${{ 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[core]: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
# Wrap the compiler with sccache: Meson uses an explicit CC/CXX verbatim,
# so the launcher must be prepended here to route compiles through sccache.
run: |
echo "CC=sccache gcc-14" >> $GITHUB_ENV
echo "CXX=sccache g++-14" >> $GITHUB_ENV
- name: Restore sccache cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-meson-sigv4-${{ github.run_id }}
restore-keys: |
sccache-meson-sigv4-
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- name: Build and test Iceberg
shell: bash
env:
CMAKE_PREFIX_PATH: /usr/local/share/vcpkg/installed/x64-linux
run: |
meson setup builddir -Dsigv4=enabled
meson compile -C builddir
sccache --show-stats
meson test -C builddir --timeout-multiplier 0 --print-errorlogs
- name: Save sccache cache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-meson-sigv4-${{ github.run_id }}