Skip to content
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ ARCH_ALIAS=x86_64
ARCH_SHORT=amd64

# Default versions for various dependencies
JDK=8
MANYLINUX=2014
MAVEN=3.5.4
PYTHON=3.8

# Used through docker-compose.yml and serves as the default version for the
Expand Down
47 changes: 38 additions & 9 deletions .github/workflows/packaging-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,50 @@
# specific language governing permissions and limitations
# under the License.

name: Packaging - Python Wheels
name: Packaging - Nightly Artifacts

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
upload_wheels:
description: "Upload wheels to Gemfury"
upload_artifacts:
description: "Upload artifacts to Gemfury"
required: true
type: boolean
default: false

jobs:
manylinux:
java:
name: "Java 1.8"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Show inputs
shell: bash
run: |
echo "upload_artifacts: ${{ github.event.inputs.upload_artifacts }}"
echo "schedule: ${{ github.event.schedule }}"
echo "ref: ${{ github.ref }}"

- name: Build and test
shell: bash
run: |
docker-compose run java-jars

- name: Upload JARs to Gemfury
shell: bash
if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_artifacts == true)
run: |
./ci/scripts/java_jar_upload.sh java/
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}

python-manylinux:
name: "Python ${{ matrix.python_version }} manylinux${{ matrix.manylinux_version }}"
runs-on: ubuntu-latest
strategy:
Expand All @@ -47,7 +76,7 @@ jobs:
- name: Show inputs
shell: bash
run: |
echo "upload_wheels: ${{ github.event.inputs.upload_wheels }}"
echo "upload_artifacts: ${{ github.event.inputs.upload_artifacts }}"
echo "schedule: ${{ github.event.schedule }}"
echo "ref: ${{ github.ref }}"

Expand Down Expand Up @@ -76,13 +105,13 @@ jobs:

- name: Upload wheels to Gemfury
shell: bash
if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_wheels == 'true')
if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_artifacts == true)
run: |
./ci/scripts/python_wheel_upload.sh python/adbc_driver_{manager,postgres}/repaired_wheels/*.whl
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}

macos:
python-macos:
name: "Python ${{ matrix.python_version }} macOS"
runs-on: macos-latest
strategy:
Expand All @@ -107,7 +136,7 @@ jobs:
- name: Show inputs
shell: bash
run: |
echo "upload_wheels: ${{ github.event.inputs.upload_wheels }}"
echo "upload_artifacts: ${{ github.event.inputs.upload_artifacts }}"
echo "schedule: ${{ github.event.schedule }}"
echo "ref: ${{ github.ref }}"

Expand Down Expand Up @@ -154,7 +183,7 @@ jobs:

- name: Upload wheels to Gemfury
shell: bash
if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_wheels == 'true')
if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_artifacts == true)
run: |
./ci/scripts/python_wheel_upload.sh python/adbc_driver_{manager,postgres}/dist/*.whl
env:
Expand Down
27 changes: 27 additions & 0 deletions ci/scripts/java_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# 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.

set -ex

source_dir=${1}

pushd ${source_dir}/java

mvn -B -DskipTests -T 2C install

popd
57 changes: 57 additions & 0 deletions ci/scripts/java_jar_upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# 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.

set -ex

main() {
local -r source_dir="${1}"
local settings_file=$(mktemp adbc.settingsXXXXXXXX.xml --tmpdir)
trap 'rm -f "$settings_file"' ERR EXIT INT TERM

pushd "${source_dir}/java"

cat <<SETTINGS > "${settings_file}"
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>fury</id>
<username>${GEMFURY_PUSH_TOKEN}</username>
<password>NOPASS</password>
<configuration>
<httpConfiguration>
<all>
<usePreemptive>true</usePreemptive>
</all>
</httpConfiguration>
</configuration>
</server>
</servers>
</settings>
SETTINGS

mvn \
-Dmaven.install.skip=true \
--settings "${settings_file}" \
deploy

popd
}

main "$@"
27 changes: 27 additions & 0 deletions ci/scripts/java_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# 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.

set -ex

source_dir=${1}

pushd ${source_dir}/java

mvn -B test

popd
12 changes: 10 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ x-hierarchy:
- python-wheel-manylinux-2014

services:
############################ Python wheels ##################################

# These reuse Arrow's images for simplicity. You won't be able to
# build the image from here.

############################ Java JARs ######################################

java-jars:
image: ${ARCH}/maven:${MAVEN}-jdk-${JDK}
volumes:
- .:/adbc:delegated
command: "/bin/bash -c '/adbc/ci/scripts/java_build.sh /adbc && /adbc/ci/scripts/java_test.sh /adbc'"

############################ Python wheels ##################################

python-wheel-manylinux:
image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}
volumes:
Expand Down
13 changes: 13 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@
</mailingList>
</mailingLists>

<distributionManagement>
<repository>
<id>fury</id>
<name>Fury</name>
<url>https://maven.fury.io/arrow-adbc-nightlies/</url>
</repository>
<snapshotRepository>
<id>fury</id>
<name>Fury</name>
<url>https://maven.fury.io/arrow-adbc-nightlies/</url>
</snapshotRepository>
</distributionManagement>

<issueManagement>
<system>Jira</system>
<url>https://issues.apache.org/jira/browse/arrow</url>
Expand Down