Skip to content

Commit 85c9ee0

Browse files
committed
ci: also verify under Docker with native deps
We've only really tested Conda so far. Validate non-Conda builds too.
1 parent 033a820 commit 85c9ee0

File tree

4 files changed

+117
-30
lines changed

4 files changed

+117
-30
lines changed

.github/workflows/nightly-verify.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,23 @@ jobs:
201201
run: |
202202
pushd arrow-adbc
203203
docker compose run -e PYTHON=3.12 --rm python-debug
204+
205+
source-verify-docker:
206+
name: "Verify under Docker"
207+
runs-on: ubuntu-latest
208+
steps:
209+
- uses: actions/checkout@v4
210+
with:
211+
fetch-depth: 0
212+
path: arrow-adbc
213+
persist-credentials: false
214+
215+
- name: Ubuntu 22.04
216+
run: |
217+
pushd arrow-adbc
218+
docker compose run --rm -e UBUNTU=22.04 verify-all-ubuntu
219+
220+
- name: Ubuntu 24.04
221+
run: |
222+
pushd arrow-adbc
223+
docker compose run --rm -e UBUNTU=24.04 verify-all-ubuntu

ci/scripts/verify_ubuntu.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
# Test the validation script using system dependencies instead of Conda.
22+
23+
set -euo pipefail
24+
25+
main() {
26+
local -r source_dir="${1}"
27+
28+
apt update
29+
apt install -y \
30+
build-essential \
31+
cmake \
32+
curl \
33+
git \
34+
libgmock-dev \
35+
libgtest-dev \
36+
libpq-dev \
37+
libsqlite3-dev \
38+
ninja-build \
39+
pkg-config
40+
41+
"${source_dir}/dev/release/verify-release-candidate.sh"
42+
}
43+
44+
main "$@"

compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,12 @@ services:
275275
retries: 5
276276
ports:
277277
- "5432:5432"
278+
279+
################################ Verification ################################
280+
281+
verify-all-ubuntu:
282+
image: ubuntu:${UBUNTU:-24.04}
283+
volumes:
284+
- .:/adbc:delegated
285+
command: |
286+
/adbc/ci/scripts/verify_ubuntu.sh /adbc

dev/release/verify-release-candidate.sh

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -246,38 +246,42 @@ install_dotnet() {
246246
return 0
247247
fi
248248

249-
show_info "Ensuring that .NET is installed..."
250-
251-
if dotnet --version | grep 8\.0 > /dev/null 2>&1; then
252-
local csharp_bin=$(dirname $(which dotnet))
253-
show_info "Found C# at $(which csharp) (.NET $(dotnet --version))"
254-
else
255-
if which dotnet > /dev/null 2>&1; then
256-
show_info "dotnet found but it is the wrong version and will be ignored."
249+
if command -v dotnet; then
250+
show_info "Found $(dotnet --version) at $(which dotnet)"
251+
252+
if dotnet --version | grep 8\.0 > /dev/null 2>&1; then
253+
local csharp_bin=$(dirname $(which dotnet))
254+
show_info "Found C# at $(which csharp) (.NET $(dotnet --version))"
255+
DOTNET_ALREADY_INSTALLED=1
256+
return 0
257257
fi
258-
local csharp_bin=${ARROW_TMPDIR}/csharp/bin
259-
local dotnet_version=8.0.204
260-
local dotnet_platform=
261-
case "$(uname)" in
258+
fi
259+
260+
show_info "dotnet found but it is the wrong version or dotnet not found"
261+
262+
local csharp_bin=${ARROW_TMPDIR}/csharp/bin
263+
local dotnet_version=8.0.204
264+
local dotnet_platform=
265+
case "$(uname)" in
262266
Linux)
263-
dotnet_platform=linux
264-
;;
267+
dotnet_platform=linux
268+
;;
265269
Darwin)
266-
dotnet_platform=macos
267-
;;
268-
esac
269-
local dotnet_download_thank_you_url=https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-${dotnet_version}-${dotnet_platform}-x64-binaries
270-
local dotnet_download_url=$( \
271-
curl -sL ${dotnet_download_thank_you_url} | \
272-
grep 'directLink' | \
273-
grep -E -o 'https://download[^"]+' | \
274-
sed -n 2p)
275-
mkdir -p ${csharp_bin}
276-
curl -sL ${dotnet_download_url} | \
270+
dotnet_platform=macos
271+
;;
272+
esac
273+
local dotnet_download_thank_you_url=https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-${dotnet_version}-${dotnet_platform}-x64-binaries
274+
show_info "Getting .NET download URL from ${dotnet_download_thank_you_url}"
275+
local dotnet_download_url=$(curl -sL ${dotnet_download_thank_you_url} | \
276+
grep 'directLink' | \
277+
grep -E -o 'https://download[^"]+' | \
278+
sed -n 2p)
279+
show_info "Downloading .NET from ${dotnet_download_url}"
280+
mkdir -p ${csharp_bin}
281+
curl -sL ${dotnet_download_url} | \
277282
tar xzf - -C ${csharp_bin}
278-
PATH=${csharp_bin}:${PATH}
279-
show_info "Installed C# at $(which csharp) (.NET $(dotnet --version))"
280-
fi
283+
PATH=${csharp_bin}:${PATH}
284+
show_info "Installed C# at $(which csharp) (.NET $(dotnet --version))"
281285

282286
DOTNET_ALREADY_INSTALLED=1
283287
}
@@ -296,6 +300,18 @@ install_go() {
296300
return 0
297301
fi
298302

303+
local prefix=${ARROW_TMPDIR}/go
304+
mkdir -p $prefix
305+
306+
if [ -f "${prefix}/go/bin/go" ]; then
307+
export GOROOT=${prefix}/go
308+
export GOPATH=${prefix}/gopath
309+
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
310+
show_info "Found $(go version) at ${prefix}/go/bin/go"
311+
GO_ALREADY_INSTALLED=1
312+
return 0
313+
fi
314+
299315
local version=1.24.2
300316
show_info "Installing go version ${version}..."
301317

@@ -315,8 +331,6 @@ install_go() {
315331
local archive="go${version}.${os}-${arch}.tar.gz"
316332
curl -sLO https://go.dev/dl/$archive
317333

318-
local prefix=${ARROW_TMPDIR}/go
319-
mkdir -p $prefix
320334
tar -xzf $archive -C $prefix
321335
rm -f $archive
322336

0 commit comments

Comments
 (0)