Repository navigation
526 lines (513 loc) · 19.8 KB
/
Copy pathintegration.yml
File metadata and controls
526 lines (513 loc) · 19.8 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# 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: Integration
on:
pull_request:
branches:
- main
paths:
- "c/**"
- "ci/**"
- "!ci/rust-nightly/**"
- "go/**"
- "python/**"
- "compose.yaml"
- ".github/workflows/integration.yml"
push:
branches-ignore:
- 'dependabot/**'
paths:
- "c/**"
- "ci/**"
- "!ci/rust-nightly/**"
- "go/**"
- "python/**"
- "compose.yaml"
- ".github/workflows/integration.yml"
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
env:
# Increment this to reset cache manually
CACHE_NUMBER: "0"
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
duckdb:
name: "DuckDB Integration Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- name: Build DuckDB Integration Tests
env:
BUILD_ALL: "0"
BUILD_DRIVER_MANAGER: "1"
BUILD_INTEGRATION_DUCKDB: "1"
ADBC_USE_ASAN: "OFF"
ADBC_USE_UBSAN: "OFF"
# Make seems to have issues with the nested DuckDB build
ADBC_CMAKE_ARGS: "-GNinja"
run: |
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
- name: Run DuckDB Integration Tests
env:
BUILD_ALL: "0"
BUILD_INTEGRATION_DUCKDB: "1"
run: |
./ci/scripts/cpp_test.sh "$(pwd)/build"
flightsql:
name: "FlightSQL Integration Tests (Dremio, SQLite, and GizmoSQL)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get required Go version
run: |
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
pip install pytest-error-for-skips
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache: true
cache-dependency-path: go/adbc/go.sum
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- name: Start SQLite server, Dremio, and GizmoSQL
run: |
docker compose up --detach flightsql-test flightsql-sqlite-test dremio dremio-init gizmosql-test
pip install python-dotenv[cli]
python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
- name: Build FlightSQL Driver
env:
BUILD_ALL: "0"
BUILD_DRIVER_FLIGHTSQL: "1"
BUILD_DRIVER_MANAGER: "1"
run: |
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
./ci/scripts/python_build.sh "$(pwd)" "$(pwd)/build"
- name: Test FlightSQL Driver against Dremio and SQLite
env:
BUILD_ALL: "0"
BUILD_DRIVER_FLIGHTSQL: "1"
run: |
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
./ci/scripts/cpp_test.sh "$(pwd)/build"
- name: Test Python Flight SQL driver against Dremio and GizmoSQL
env:
BUILD_ALL: "0"
BUILD_DRIVER_FLIGHTSQL: "1"
PYTEST_ADDOPTS: "--error-for-skips"
run: |
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
- name: Stop SQLite server, Dremio, and GizmoSQL
run: |
docker compose down
sqlite:
name: "SQLite Validation"
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- name: Build SQLite Driver
env:
BUILD_ALL: "OFF"
BUILD_DRIVER_MANAGER: "ON"
BUILD_DRIVER_SQLITE: "ON"
run: |
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
./ci/scripts/python_build.sh "$(pwd)" "$(pwd)/build"
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Run SQLite validation suite
env:
ADBC_USE_ASAN: "ON"
ADBC_USE_UBSAN: "ON"
BUILD_ALL: "0"
BUILD_DRIVER_SQLITE: "1"
run: |
export PYTHONPATH="$(pwd)/python/adbc_driver_manager"
uv --project=./c/driver/sqlite/validation/ run \
ci/scripts/validate.sh "$(pwd)"
postgresql-build:
name: "PostgreSQL Build"
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
pip install pytest-error-for-skips
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- name: Build PostgreSQL Driver
env:
BUILD_ALL: "OFF"
BUILD_DRIVER_MANAGER: "ON"
BUILD_DRIVER_POSTGRESQL: "ON"
run: |
./ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
./ci/scripts/python_build.sh "$(pwd)" "$(pwd)/build"
# Artifact actions do not preserve symlinks, so archive the build tree and
# the generated Python extension/library files ourselves.
- name: Archive PostgreSQL build
run: |
tar --create --gzip --file postgresql-build.tgz \
build \
python/adbc_driver_manager \
python/adbc_driver_postgresql
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: postgresql-build
retention-days: 3
path: postgresql-build.tgz
postgresql-test:
name: "PostgreSQL (14-18)"
needs: postgresql-build
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
pip install pytest-error-for-skips
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: postgresql-build
- name: Extract PostgreSQL build
run: |
tar --extract --gzip --file postgresql-build.tgz
echo "PYTHONPATH=$(pwd)/python/adbc_driver_manager:$(pwd)/python/adbc_driver_postgresql" >> "$GITHUB_ENV"
- name: Run PostgreSQL 14-18 tests
env:
ADBC_POSTGRESQL_TEST_URI: postgresql://localhost:5432/postgres?user=postgres&password=password
ADBC_USE_ASAN: "ON"
ADBC_USE_UBSAN: "ON"
BUILD_ALL: "0"
BUILD_DRIVER_POSTGRESQL: "1"
run: |
for postgres_version in 14 15 16 17 18; do
echo "::group::PostgreSQL $postgres_version"
export POSTGRES_VERSION="$postgres_version"
docker compose up --wait --detach postgres-test
./ci/scripts/cpp_test.sh "$(pwd)/build"
env PYTEST_ADDOPTS=--error-for-skips \
./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
if [ "$postgres_version" = "18" ]; then
uv --project=./c/driver/postgresql/validation/ run \
ci/scripts/validate.sh "$(pwd)" --vendor postgresql
env POSTGRES_TYPE_RESOLVER_MODE=builtin \
uv --project=./c/driver/postgresql/validation/ run \
ci/scripts/validate.sh "$(pwd)" --vendor postgresql
fi
docker compose stop postgres-test
docker compose rm --force --stop --volumes postgres-test
echo "::endgroup::"
done
- name: Capture PostgreSQL logs
if: failure()
run: |
docker compose logs postgres-test
postgresql-vendor-test:
name: "PostgreSQL (${{ matrix.name }})"
needs: postgresql-build
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- name: AlloyDB Omni
service: alloydb-omni-test
vendor: alloydb-omni
uri: postgresql://localhost:5440/postgres?user=postgres&password=password
experimental: false
- name: CedarDB
service: cedardb-test
vendor: cedardb
uri: postgresql://localhost:5433/postgres?user=postgres&password=CedarDB2026%21
experimental: false
- name: Citus
service: citus-test
vendor: citus
uri: postgresql://localhost:5434/postgres?user=postgres&password=password
experimental: false
- name: CockroachDB
service: cockroachdb-test
vendor: cockroachdb
uri: postgresql://root@localhost:5435/postgres?sslmode=disable&options=-c%20experimental_enable_temp_tables%3Don
experimental: false
- name: CrateDB
service: cratedb-test
vendor: cratedb
uri: postgresql://crate@localhost:5436/doc?sslmode=disable
experimental: true
- name: Materialize
service: materialize-test
vendor: materialize
uri: postgresql://materialize@localhost:5441/materialize?sslmode=disable
experimental: false
- name: ParadeDB
service: paradedb-test
vendor: paradedb
uri: postgresql://localhost:5437/postgres?user=postgres&password=password
experimental: false
- name: TimescaleDB
service: timescaledb-test
vendor: timescaledb
uri: postgresql://localhost:5438/postgres?user=postgres&password=password
experimental: false
- name: YugabyteDB
service: yugabytedb-test
vendor: yugabytedb
uri: postgresql://localhost:5439/yugabyte?user=yugabyte&password=yugabyte
experimental: false
steps:
- name: Free up disk space
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get Date
id: get-date
run: |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/**') }}
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-1
use-only-tar-bz2: false
use-mamba: true
- name: Install Dependencies
run: |
./ci/scripts/remamba.sh install -c conda-forge \
--file ci/conda_env_cpp.txt \
--file ci/conda_env_python.txt
pip install pytest-error-for-skips
- name: Work around ASAN issue (GH-1617)
run: |
sudo sysctl vm.mmap_rnd_bits=28
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: postgresql-build
- name: Extract PostgreSQL build
run: |
tar --extract --gzip --file postgresql-build.tgz
echo "PYTHONPATH=$(pwd)/python/adbc_driver_manager:$(pwd)/python/adbc_driver_postgresql" >> "$GITHUB_ENV"
- name: Start ${{ matrix.name }}
run: |
docker compose up --wait --detach "${{ matrix.service }}"
- name: Run validation suite
# Currently fails, but could be supported in the future.
# https://github.com/apache/arrow-adbc/issues/1755
if: matrix.vendor != 'cedardb'
env:
ADBC_POSTGRESQL_TEST_URI: ${{ matrix.uri }}
ADBC_USE_ASAN: "ON"
ADBC_USE_UBSAN: "ON"
BUILD_ALL: "0"
BUILD_DRIVER_POSTGRESQL: "1"
run: |
uv --project=./c/driver/postgresql/validation/ run \
ci/scripts/validate.sh "$(pwd)" --vendor "${{ matrix.vendor }}"
- name: Run validation suite (with alternate type resolver)
env:
ADBC_POSTGRESQL_TEST_URI: ${{ matrix.uri }}
ADBC_USE_ASAN: "ON"
ADBC_USE_UBSAN: "ON"
BUILD_ALL: "0"
BUILD_DRIVER_POSTGRESQL: "1"
POSTGRES_TYPE_RESOLVER_MODE: "builtin"
run: |
uv --project=./c/driver/postgresql/validation/ run \
ci/scripts/validate.sh "$(pwd)" --vendor "${{ matrix.vendor }}"
- name: Capture ${{ matrix.name }} logs
if: failure()
run: |
docker compose logs "${{ matrix.service }}"
flightsql_interop:
name: "FlightSQL C# Interop"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Get required Go version
run: |
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache: true
cache-dependency-path: go/adbc/go.sum
- name: Build ADBC Driver
working-directory: go/adbc/pkg
run: |
make libadbc_driver_flightsql.so
- name: Start Test Servers
run: |
docker compose up --wait --detach spiceai-test
- name: Test Driver against Spice.ai OSS
env:
FLIGHTSQL_INTEROP_TEST_CONFIG_FILE: "../../../../../csharp/configs/flightsql-spiceai.json"
run: |
dotnet test ./csharp/test/Drivers/Interop/FlightSql/Apache.Arrow.Adbc.Tests.Drivers.Interop.FlightSql.csproj
- name: Stop Test Servers
run: |
docker compose down