Skip to content

Commit 3efb5f8

Browse files
authored

File tree

3 files changed

+100
-6
lines changed

3 files changed

+100
-6
lines changed

.github/workflows/test.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,56 @@ jobs:
7979
password: ${{ secrets.GITHUB_TOKEN }}
8080
- name: Pull
8181
run: |
82-
docker compose pull debian-go || :
82+
docker compose pull debian || :
8383
- name: Test
8484
run: |
85-
docker compose run debian-go
85+
docker compose run debian
8686
- name: Push
8787
if: >-
8888
success() && github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
8989
continue-on-error: true
9090
run: |
91-
docker compose push debian-go
91+
docker compose push debian
92+
docker-cgo:
93+
name: AMD64 Debian 12 Go ${{ matrix.go }} - CGO
94+
runs-on: ubuntu-latest
95+
timeout-minutes: 20
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
go:
100+
- '1.22'
101+
- '1.23'
102+
env:
103+
GO: ${{ matrix.go }}
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
107+
with:
108+
submodules: recursive
109+
- name: Login to GitHub Container registry
110+
uses: docker/login-action@v3
111+
with:
112+
registry: ghcr.io
113+
username: ${{ github.actor }}
114+
password: ${{ secrets.GITHUB_TOKEN }}
115+
- name: Pull
116+
run: |
117+
docker compose pull debian || :
118+
docker compose pull debian-cgo || :
119+
- name: Build
120+
run: |
121+
docker compose build debian
122+
docker compose build debian-cgo
123+
- name: Test
124+
run: |
125+
docker compose run debian-cgo
126+
- name: Push
127+
if: >-
128+
success() && github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
129+
continue-on-error: true
130+
run: |
131+
docker compose push debian-cgo
92132
macos:
93133
name: AMD64 macOS 12 Go ${{ matrix.go }}
94134
runs-on: macos-12

ci/docker/debian-cgo.dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
ARG base
19+
FROM ${base}
20+
21+
ENV DEBIAN_FRONTEND noninteractive
22+
23+
# install libarrow-dev to link against with CGO
24+
RUN apt-get update -y -q && \
25+
apt-get install -y -q --no-install-recommends \
26+
ca-certificates \
27+
lsb-release \
28+
wget && \
29+
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
30+
apt-get install -y -q --no-install-recommends \
31+
./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
32+
rm -f apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
33+
apt-get update -y -q && \
34+
apt-get install -y -q --no-install-recommends \
35+
cmake \
36+
libarrow-dev && \
37+
apt-get clean

compose.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
# $ ARCH=arm64v8 docker compose run debian-go
2727

2828
services:
29-
debian-go:
29+
debian:
3030
# Usage:
31-
# docker compose build debian-go
32-
# docker compose run debian-go
31+
# docker compose build debian
32+
# docker compose run debian
3333
image: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}
3434
build:
3535
context: .
@@ -47,3 +47,20 @@ services:
4747
git config --global --add safe.directory /arrow-go && \
4848
/arrow-go/ci/scripts/build.sh /arrow-go && \
4949
/arrow-go/ci/scripts/test.sh /arrow-go"
50+
debian-cgo:
51+
# Usage:
52+
# docker compose build debian-cgo
53+
# docker compose run debian-cgo
54+
image: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}-cgo
55+
build:
56+
context: .
57+
dockerfile: ci/docker/debian-cgo.dockerfile
58+
cache_from:
59+
- ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}-cgo
60+
args:
61+
base: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}
62+
shm_size: *shm-size
63+
volumes: *debian-volumes
64+
environment:
65+
ARROW_GO_TESTCGO: "1"
66+
command: *go-command

0 commit comments

Comments
 (0)