Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-7: Add test CI: Debian + CGO #116

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions ci/docker/debian-cgo.dockerfile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 20 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Expand All @@ -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
Loading