You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ra...@apache.org on 2024/09/10 07:47:23 UTC
(arrow-go) branch main updated: GH-7: Add test CI: Debian + CGO (#116)
This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-go.git
The following commit(s) were added to refs/heads/main by this push:
new 3efb5f8 GH-7: Add test CI: Debian + CGO (#116)
3efb5f8 is described below
commit 3efb5f8480a73ee86e4948f2dfbf774e3c73a298
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Tue Sep 10 16:47:18 2024 +0900
GH-7: Add test CI: Debian + CGO (#116)
Fix GH-7
This part:
https://github.com/apache/arrow/blob/58415d1fac50cb829b3dcf08526033d6db8c30db/.github/workflows/go.yml#L192-L230
---
.github/workflows/test.yml | 46 ++++++++++++++++++++++++++++++++++++++---
ci/docker/debian-cgo.dockerfile | 37 +++++++++++++++++++++++++++++++++
compose.yaml | 23 ++++++++++++++++++---
3 files changed, 100 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e21ffb5..0d0efeb 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -79,16 +79,56 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull
run: |
- docker compose pull debian-go || :
+ docker compose pull debian || :
- name: Test
run: |
- docker compose run debian-go
+ docker compose run debian
- name: Push
if: >-
success() && github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
continue-on-error: true
run: |
- docker compose push debian-go
+ docker compose push debian
+ docker-cgo:
+ name: AMD64 Debian 12 Go ${{ matrix.go }} - CGO
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ go:
+ - '1.22'
+ - '1.23'
+ env:
+ GO: ${{ matrix.go }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ with:
+ submodules: recursive
+ - name: Login to GitHub Container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Pull
+ run: |
+ docker compose pull debian || :
+ docker compose pull debian-cgo || :
+ - name: Build
+ run: |
+ docker compose build debian
+ docker compose build debian-cgo
+ - name: Test
+ run: |
+ docker compose run debian-cgo
+ - name: Push
+ if: >-
+ success() && github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
+ continue-on-error: true
+ run: |
+ docker compose push debian-cgo
macos:
name: AMD64 macOS 12 Go ${{ matrix.go }}
runs-on: macos-12
diff --git a/ci/docker/debian-cgo.dockerfile b/ci/docker/debian-cgo.dockerfile
new file mode 100644
index 0000000..d6171d3
--- /dev/null
+++ b/ci/docker/debian-cgo.dockerfile
@@ -0,0 +1,37 @@
+# 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.
+
+ARG base
+FROM ${base}
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# install libarrow-dev to link against with CGO
+RUN apt-get update -y -q && \
+ apt-get install -y -q --no-install-recommends \
+ ca-certificates \
+ lsb-release \
+ wget && \
+ 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 && \
+ apt-get install -y -q --no-install-recommends \
+ ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
+ rm -f apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
+ apt-get update -y -q && \
+ apt-get install -y -q --no-install-recommends \
+ cmake \
+ libarrow-dev && \
+ apt-get clean
diff --git a/compose.yaml b/compose.yaml
index a17de30..42d306b 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -26,10 +26,10 @@
# $ ARCH=arm64v8 docker compose run debian-go
services:
- debian-go:
+ debian:
# Usage:
- # docker compose build debian-go
- # docker compose run debian-go
+ # docker compose build debian
+ # docker compose run debian
image: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}
build:
context: .
@@ -47,3 +47,20 @@ services:
git config --global --add safe.directory /arrow-go && \
/arrow-go/ci/scripts/build.sh /arrow-go && \
/arrow-go/ci/scripts/test.sh /arrow-go"
+ debian-cgo:
+ # Usage:
+ # docker compose build debian-cgo
+ # docker compose run debian-cgo
+ image: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}-cgo
+ build:
+ context: .
+ dockerfile: ci/docker/debian-cgo.dockerfile
+ cache_from:
+ - ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}-cgo
+ args:
+ base: ${REPO}:${ARCH}-debian-${DEBIAN}-${GO}
+ shm_size: *shm-size
+ volumes: *debian-volumes
+ environment:
+ ARROW_GO_TESTCGO: "1"
+ command: *go-command