Skip to content

Commit

Permalink
dummy action for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes committed Oct 30, 2024
1 parent a3273a4 commit 2ef1cf3
Showing 1 changed file with 9 additions and 257 deletions.
266 changes: 9 additions & 257 deletions .github/workflows/Java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,201 +11,12 @@ env:
OVERRIDE_GIT_DESCRIBE: ${{ inputs.override_git_describe }}

jobs:
format_check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- run: make format-check

java-linux-amd64:
name: Java Linux (amd64)
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64
env:
GEN: ninja
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- uses: ./.github/actions/manylinux_2014_setup
with:
ninja-build: 1
ccache: 1
jdk: 1
python_alias: 1
aws-cli: 1

- name: Build
shell: bash
run: make release

- name: Java Tests
shell: bash
if: ${{ inputs.skip_tests != 'true' }}
run: make test

- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-amd64.jar
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-amd64.jar
- uses: actions/upload-artifact@v3
with:
name: java-linux-amd64
path: |
build/release/duckdb_jdbc.jar
java-linux-aarch64:
name: Java Linux (aarch64)
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
needs: java-linux-amd64
env:
GEN: ninja
DUCKDB_PLATFORM: linux_arm64
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- uses: ./.github/actions/ubuntu_18_setup
with:
ccache: 1
aarch64_cross_compile: 1

- name: Install Stuff
shell: bash
run: >
curl -L https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u345-b01/OpenJDK8U-jdk_x64_linux_hotspot_8u345b01.tar.gz | tar xvz
- name: Build
shell: bash
run: CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ OVERRIDE_JDBC_OS_ARCH=arm64 make release

- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
cp build/release/duckdb_jdbc.jar duckdb_jdbc-linux-aarch64.jar
# ./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-linux-aarch64.jar
- uses: actions/upload-artifact@v3
with:
name: java-linux-aarch64
path: |
build/release/duckdb_jdbc.jar
java-windows-amd64:
name: Java Windows (amd64)
runs-on: windows-2019
needs: java-linux-amd64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-java' }}

- name: Build
shell: bash
run: make release
- name: Java Tests
if: ${{ inputs.skip_tests != 'true' }}
shell: bash
run: |
ls -R .
make test
- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
cp build/release/duckdb_jdbc.jar duckdb_jdbc-windows-amd64.jar
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-windows-amd64.jar
- uses: actions/upload-artifact@v3
with:
name: java-windows-amd64
path: |
build/release/duckdb_jdbc.jar
java-osx-universal:
name: Java OSX (Universal)
runs-on: macos-14
needs: java-linux-amd64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' }}
- name: Build
shell: bash
run: make release
- name: Java Tests
if: ${{ inputs.skip_tests != 'true' }}
shell: bash
run: make test
- name: See if this actually universal
shell: bash
run: lipo -archs build/release/libduckdb_java.so_osx_universal | grep "x86_64 arm64"
- name: Deploy
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
cp build/release/duckdb_jdbc.jar duckdb_jdbc-osx-universal.jar
./scripts/upload-assets-to-staging.sh github_release duckdb_jdbc-osx-universal.jar
- uses: actions/upload-artifact@v3
with:
name: java-osx-universal
path: |
build/release/duckdb_jdbc.jar

java-combine:
if: ${{ inputs.override_git_describe == '' }}
name: Java Combine
runs-on: ubuntu-latest
needs:
- java-linux-aarch64
- java-linux-amd64
- java-windows-amd64
- java-osx-universal


steps:
- uses: actions/checkout@v3
Expand All @@ -216,33 +27,19 @@ jobs:
- shell: bash
run: mkdir jdbc-artifacts

- uses: actions/download-artifact@v3
with:
name: java-linux-aarch64
path: jdbc-artifacts/java-linux-aarch64

- uses: actions/download-artifact@v3
with:
name: java-linux-amd64
path: jdbc-artifacts/java-linux-amd64

- uses: actions/download-artifact@v3
with:
name: java-windows-amd64
path: jdbc-artifacts/java-windows-amd64

- uses: actions/download-artifact@v3
with:
name: java-osx-universal
path: jdbc-artifacts/java-osx-universal
- name: Get dummy JAR
shell: bash
run: |
wget https://artifacts.duckdb.org/duckdb-java/main/java-jars.zip
unzip java-jars.zip
ls -R .
- name: Combine JARs
shell: bash
run: |
mkdir -p ~/.gnupg
echo -e "use-agent\npinentry-mode loopback\nno-tty\nbatch\n" > ~/.gnupg/gpg.conf
echo -e "allow-loopback-pinentry\n" > ~/.gnupg/gpg-agent.conf
if [[ "$GITHUB_REF" =~ ^(refs/heads/main|refs/tags/v.+)$ && "$GITHUB_REPOSITORY" = "duckdb/duckdb-java" ]] ; then
export XML='
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -257,11 +54,10 @@ jobs:
</servers>
</settings> '
mkdir ~/.m2
echo $XML | sed "s/PASSWORD/${{ secrets.MAVEN_PASSWORD }}/" > ~/.m2/settings.xml
echo $XML > ~/.m2/settings.xml
echo "${{ secrets.MAVEN_PGP_PK }}" | base64 -d > maven_pgp_key
gpg --batch --import maven_pgp_key
python scripts/jdbc_maven_deploy.py ${{ github.ref_name }} jdbc-artifacts .
fi
ls -lahR jdbc-artifacts
- name: Upload artifacts
Expand All @@ -271,47 +67,3 @@ jobs:
name: java-jars
path: |
jdbc-artifacts
jdbc-compliance:
name: JDBC Compliance
runs-on: ubuntu-20.04
if: ${{ inputs.skip_tests != 'true' }}
needs: java-linux-amd64
container: quay.io/pypa/manylinux2014_x86_64
env:
BUILD_JDBC: 1
GEN: ninja
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- uses: ./.github/actions/manylinux_2014_setup
with:
ninja-build: 1
ccache: 1
jdk: 1
python_alias: 1
aws-cli: 1

- name: Install
shell: bash
run: |
git clone https://github.com/cwida/jdbccts.git
- name: Setup Ccache
uses: hendrikmuhs/[email protected] # Note: pinned due to GLIBC incompatibility in later releases
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-java' }}

- name: Build
shell: bash
run: make release

- name: Test
shell: bash
run: (cd jdbccts && make DUCKDB_JAR=../build/release/duckdb_jdbc.jar test)

0 comments on commit 2ef1cf3

Please sign in to comment.