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

add jdk matrix to verify compatibilty #11

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
38 changes: 23 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,38 @@ on:
pull_request:
branches: [ "main" ]

env:
HYPER_VERSION: "0.0.21200.re11c8cb9"

jobs:
download-hyperd:
uses: ./.github/workflows/hyperd.yml
with:
hyper_version: "0.0.21200.re11c8cb9"

build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [8, 11, 17, 21]
name: Build with JDK ${{ matrix.java-version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up JDK 8
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Get hyperd version
id: evaluate-property
run: |
echo "HYPER_VERSION=$(mvn help:evaluate -Dexpression=hyperapi.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Cache hyperd
uses: actions/cache@v3
# cache: maven
- name: Maven clean
run: mvn --batch-mode clean
- name: Restore hyperd from cache
uses: actions/cache@v4
with:
path: |
target/.cache
key: ${{ runner.os }}-hyper-${{ env.HYPER_VERSION }}
restore-keys: |
${{ runner.os }}-hyper-${{ env.HYPER_VERSION }}
path: target/hyper
fail-on-cache-miss: 'true'
key: hyperd-${{ runner.os }}-${{ env.HYPER_VERSION }}
- name: Maven package
run: mvn --batch-mode --no-transfer-progress clean package --file pom.xml
run: mvn --batch-mode --no-transfer-progress package --file pom.xml -Dskip.hyper.download=true -X
38 changes: 38 additions & 0 deletions .github/workflows/hyperd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
workflow_call:
inputs:
hyper_version:
required: true
type: string

jobs:
download-hyperd:
runs-on: ubuntu-latest
steps:
- name: Cache hyperd
id: cache-hyperd
uses: actions/cache@v4
with:
path: target/hyper
key: hyperd-${{ runner.os }}-${{ inputs.hyper_version }}
restore-keys:
hyperd-${{ runner.os }}-

- name: Download hyperd if not cached
if: steps.cache-hyperd.outputs.cache-hit != 'true'
run: |
wget "https://downloads.tableau.com/tssoftware/tableauhyperapi-cxx-linux-x86_64-release-main.${{ inputs.hyper_version }}.zip" -O /tmp/hyperd.zip

- name: Extract hyperd to target/hyper
if: steps.cache-hyperd.outputs.cache-hit != 'true'
run: |
mkdir -p target/hyper
unzip -j /tmp/hyperd.zip -d target/hyper "**/hyperd" "**/*.so"

- name: Verify hyperd exists
run: |
ls -latrR
if [[ ! -f "target/hyper/hyperd" ]]; then
echo "ERROR: hyperd is missing!"
exit 1
fi
26 changes: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ on:
release:
types: [ "created" ]

env:
HYPER_VERSION: "0.0.21200.re11c8cb9"

jobs:
download-hyperd:
uses: ./.github/workflows/hyperd.yml
with:
hyper_version: ${{ env.HYPER_VERSION }}

build:
runs-on: ubuntu-latest

Expand All @@ -20,22 +28,16 @@ jobs:
server-password: 'MAVEN_PASSWORD'
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
- name: Get hyperd version
id: evaluate-property
run: |
echo "HYPER_VERSION=$(mvn help:evaluate -Dexpression=hyperapi.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Cache hyperd
uses: actions/cache@v3
- name: Restore hyperd from cache
uses: actions/cache@v4
with:
path: |
target/.cache
key: ${{ runner.os }}-hyper-${{ env.HYPER_VERSION }}
restore-keys: |
${{ runner.os }}-hyper-${{ env.HYPER_VERSION }}
path: target/hyper
fail-on-cache-miss: 'true'
key: hyperd-${{ runner.os }}-${{ env.HYPER_VERSION }}
- name: Set version
run: mvn versions:set --no-transfer-progress -DnewVersion=${{ github.event.release.tag_name }}
- name: Build with Maven
run: mvn --batch-mode --no-transfer-progress clean deploy -P release --file pom.xml
run: mvn --batch-mode --no-transfer-progress clean deploy -P release --file pom.xml -Dskip.hyper.download=true
env:
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<grpcmock-junit5.version>0.13.0</grpcmock-junit5.version>
<guava.version>33.2.1-jre</guava.version>
<!-- https://tableau.github.io/hyper-db/docs/releases#download -->
<hyperapi.version>0.0.20746.reac9bd2d</hyperapi.version>
<hyperapi.version>0.0.21200.re11c8cb9</hyperapi.version>
<hyperd.directory>${project.build.directory}/hyper</hyperd.directory>
<jackson.version>2.18.0</jackson.version>
<jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
Expand All @@ -33,7 +33,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<protobuf.version>3.25.5</protobuf.version>
<release.profile.active>false</release.profile.active>
<shadeBase>com.salesforce.datacloud.jdbc.internal.shaded</shadeBase>
<skip.hyper.download>false</skip.hyper.download>
<slf4j.version>1.7.32</slf4j.version>
<spotless.version>2.30.0</spotless.version>
</properties>
Expand Down Expand Up @@ -626,6 +628,7 @@
<url>${hyper-download-url}.${hyperapi.version}.zip</url>
<unpack>true</unpack>
<outputDirectory>${download.cache.directory}/hyper-unzipped</outputDirectory>
<skip>${skip.hyper.download}</skip>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -654,6 +657,7 @@
<flattenmapper/>
</copy>
</target>
<skip>${skip.hyper.download}</skip>
</configuration>
</execution>
<execution>
Expand Down
Loading