forked from apache/arrow-adbc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
243 lines (216 loc) · 8.13 KB
/
docker-compose.yml
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
# 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.
version: '3.9'
services:
# These reuse Arrow's images for simplicity. You won't be able to
# build the image from here.
############################### C#/.NET ######################################
csharp-dist:
image: mcr.microsoft.com/dotnet/sdk:8.0
volumes:
- .:/adbc:delegated
command: |
/adbc/ci/scripts/csharp_pack.sh /adbc
################################ C/C++ #######################################
# Build/test with latest Clang
cpp-clang-latest:
build:
context: .
dockerfile: ci/docker/cpp-clang-latest.dockerfile
args:
VCPKG: ${VCPKG}
volumes:
- .:/adbc:delegated
command: "bash -c 'export PATH=$PATH:/opt/go/bin CC=$(which clang) CXX=$(which clang++) && git config --global --add safe.directory /adbc && /adbc/ci/scripts/cpp_build.sh /adbc /adbc/build && env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 BUILD_DRIVER_SQLITE=1 /adbc/ci/scripts/cpp_test.sh /adbc/build'"
############################ Documentation ###################################
docs:
image: condaforge/miniforge3:latest
volumes:
- .:/adbc:delegated
environment:
ADBC_USE_ASAN: "0"
ADBC_USE_UBSAN: "0"
CGO_ENABLED: "1"
command: |
/bin/bash -c 'git config --global --add safe.directory /adbc && source /opt/conda/etc/profile.d/conda.sh && mamba create -y -n adbc -c conda-forge go --file /adbc/ci/conda_env_cpp.txt --file /adbc/ci/conda_env_docs.txt --file /adbc/ci/conda_env_java.txt --file /adbc/ci/conda_env_python.txt && conda activate adbc && /adbc/ci/scripts/cpp_build.sh /adbc /adbc/build && /adbc/ci/scripts/go_build.sh /adbc /adbc/build && /adbc/ci/scripts/python_build.sh /adbc /adbc/build && /adbc/ci/scripts/r_build.sh /adbc && /adbc/ci/scripts/docs_build.sh /adbc'
############################ Java JARs ######################################
java-dist:
image: ${ARCH}/maven:${MAVEN}-jdk-${JDK}
volumes:
- .:/adbc:delegated
command: "/bin/bash -c '/adbc/ci/scripts/java_build.sh /adbc /adbc/dist && /adbc/ci/scripts/java_test.sh /adbc'"
############################ Python conda ##################################
# Must be run as docker-compose run -e HOST_USER_ID=$(id -u) python-conda
python-conda:
image: condaforge/linux-anvil-cos7-x86_64
volumes:
- .:/adbc:delegated
command: "/bin/bash -c 'conda config --remove channels defaults && /adbc/ci/scripts/python_conda_build.sh /adbc ${ARCH_CONDA_FORGE}.yaml /adbc/build'"
python-conda-test:
image: condaforge/mambaforge
volumes:
- .:/adbc:delegated
command: "/bin/bash -c '/adbc/ci/scripts/python_conda_test.sh /adbc /adbc/build'"
python-debug:
image: ${REPO}:${ARCH}-python-${PYTHON}-debug-adbc
build:
context: .
cache_from:
- ${REPO}:${ARCH}-python-${PYTHON}-debug-adbc
dockerfile: ci/docker/python-debug.dockerfile
args:
ARCH: ${ARCH}
GO: ${GO}
volumes:
- .:/adbc:delegated
command: /adbc/ci/docker/python-debug.sh
############################ Python sdist ##################################
python-sdist:
image: ${ARCH}/python:${PYTHON}
volumes:
- .:/adbc:delegated
command: "/bin/bash -c 'git config --global --add safe.directory /adbc && source /adbc/ci/scripts/python_sdist_build.sh /adbc'"
python-sdist-test:
image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
build:
context: .
cache_from:
- ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
dockerfile: ci/docker/python-wheel-manylinux.dockerfile
args:
ARCH: ${ARCH}
GO: ${GO}
MANYLINUX: ${MANYLINUX}
PYTHON: ${PYTHON}
REPO: ${REPO}
VCPKG: ${VCPKG}
volumes:
- .:/adbc:delegated
command: "'git config --global --add safe.directory /adbc && source /adbc/ci/scripts/python_sdist_test.sh ${ARCH} /adbc'"
############################ Python wheels ##################################
python-wheel-manylinux:
image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
build:
context: .
cache_from:
- ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}-adbc
dockerfile: ci/docker/python-wheel-manylinux.dockerfile
args:
ARCH: ${ARCH}
GO: ${GO}
MANYLINUX: ${MANYLINUX}
PYTHON: ${PYTHON}
REPO: ${REPO}
VCPKG: ${VCPKG}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .:/adbc
# Must set safe.directory so miniver won't error when calling git
command: "'git config --global --add safe.directory /adbc && git config --global --get safe.directory && /adbc/ci/scripts/python_wheel_unix_build.sh ${ARCH} /adbc /adbc/build'"
python-wheel-manylinux-test:
image: ${ARCH}/python:${PYTHON}-slim
platform: ${PLATFORM}
volumes:
- .:/adbc:delegated
command: /adbc/ci/scripts/python_wheel_unix_test.sh /adbc
###################### Test database environments ############################
dremio:
container_name: adbc-dremio
image: dremio/dremio-oss:latest
environment:
DREMIO_JAVA_EXTRA_OPTS: "-Ddebug.addDefaultUser=true -Ddremio.eula.disabled=true"
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:9047" ]
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
ports:
- "9047:9047"
- "32010:32010"
- "31010:31010"
- "45678:45678"
dremio-init:
container_name: adbc-dremio-init
image: ${REPO}:adbc-dremio-init
build:
context: .
cache_from:
- ${REPO}:adbc-dremio-init
dockerfile: ci/docker/dremio-init.dockerfile
environment:
dremio_url: http://dremio:9047
depends_on:
dremio:
condition: service_healthy
entrypoint: "/init/bootstrap.sh"
volumes:
- "./ci/scripts/integration/dremio:/init"
flightsql-test:
image: ${REPO}:adbc-flightsql-test
build:
context: .
cache_from:
- ${REPO}:adbc-flightsql-test
dockerfile: ci/docker/flightsql-test.dockerfile
args:
GO: ${GO}
healthcheck:
test: ["CMD", "curl", "--http2-prior-knowledge", "-XPOST", "-H", "content-type: application/grpc"]
interval: 5s
timeout: 30s
retries: 3
start_period: 5m
ports:
- "41414:41414"
volumes:
- .:/adbc:delegated
command: >-
/bin/bash -c "cd /adbc/go/adbc && go run ./driver/flightsql/cmd/testserver -host 0.0.0.0 -port 41414"
flightsql-sqlite-test:
image: ${REPO}:golang-${GO}-sqlite-flightsql
build:
context: .
cache_from:
- ${REPO}:golang-${GO}-sqlite-flightsql
dockerfile: ci/docker/golang-flightsql-sqlite.dockerfile
args:
GO: ${GO}
ARROW_MAJOR_VERSION: ${ARROW_MAJOR_VERSION}
ports:
- 8080:8080
mssql-test:
container_name: adbc_mssql_test
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "Password1!"
ports:
- "1433:1433"
postgres-test:
container_name: adbc_postgres_test
image: postgres:${POSTGRES_VERSION:-latest}
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"