update to TileDB 2.28.0 #818
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TileDB-Java | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
branches: | |
- master | |
- test-* | |
pull_request: | |
jobs: | |
Test_Windows: | |
runs-on: windows-2019 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: assemble | |
uses: gradle/[email protected] | |
with: | |
arguments: assemble | |
- name: test | |
uses: gradle/[email protected] | |
with: | |
arguments: test | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: OFF | |
ORG_GRADLE_PROJECT_TILEDB_S3: OFF | |
Test_Ubuntu_macOS: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-13, macos-14 ] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
check-latest: true | |
- run: | | |
unset SYSTEM | |
./gradlew checkFormat | |
shell: bash | |
name: checkFormat | |
- run: | | |
unset SYSTEM | |
./gradlew assemble | |
shell: bash | |
name: assemble | |
- run: | | |
unset SYSTEM | |
./gradlew test | |
shell: bash | |
name: test | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: OFF | |
ORG_GRADLE_PROJECT_TILEDB_S3: OFF | |
Examples: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- run: | | |
unset SYSTEM | |
./gradlew assemble; | |
shell: bash | |
name: assemble | |
- name: Run examples | |
run: | | |
cd build/libs | |
rm *javadoc* *sources* | |
p=$(readlink -f *.jar) | |
cd ../../src/main/java/examples/io/tiledb/java/api | |
javac -cp $p *.java | |
for x in $(ls -1 *.java | sed 's/.java//'); | |
do | |
echo $x; | |
class_name=examples.io.tiledb.java.api.$x; | |
java -cp $p $class_name; | |
done | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: OFF | |
ORG_GRADLE_PROJECT_TILEDB_S3: OFF | |
Create_Artifacts_Windows: | |
if: startsWith(github.ref, 'refs/tags/') || contains(github.ref, 'test') | |
needs: [Test_Windows, Examples] | |
name: Create_Artifacts_Windows | |
runs-on: windows-2019 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- run: | | |
mkdir binaries_Windows | |
./gradlew.bat assemble | |
Copy-Item ./build/tiledb_jni/Release/*.dll -Destination ./binaries_Windows/ | |
Copy-Item ./build/install/bin/*.dll -Destination ./binaries_Windows/ | |
name: Assemble | |
- run: | | |
set -e pipefail | |
# Display log files if the build failed | |
echo "Dumping log files for failed build" | |
echo "----------------------------------" | |
for f in $(find $BUILD_REPOSITORY_LOCALPATH -name *.log); | |
do echo "------" | |
echo $f | |
echo "======" | |
cat $f | |
done; | |
if: ${{ failure() }} | |
name: "Print log files (failed build only)" | |
- name: Archive files | |
uses: master-atul/[email protected] | |
id: compress | |
with: | |
command: c | |
cwd: ./ | |
files: | | |
./binaries_Windows | |
outPath: tiledb-Win.gz.tar | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Upload-Artifact-Windows | |
path: tiledb-Win.gz.tar | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_S3: ON | |
Create_Artifacts_Ubuntu_MacOS: | |
if: startsWith(github.ref, 'refs/tags/') || contains(github.ref, 'test') | |
needs: [Test_Ubuntu_macOS, Examples] | |
name: Create_Artifacts_Ubuntu_MacOS | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-13, ubuntu-latest, macos-14] | |
steps: | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
check-latest: true | |
- name: checkout | |
uses: actions/checkout@v4 | |
- run: | | |
set +e | |
mkdir binaries_$RUNNER_OS | |
if [[ ( "$RUNNER_OS" == "Linux" ) ]]; then | |
docker build -f ci/Dockerfile2010 . -t lib_builder_2010 | |
docker run -e "CFLAGS=$CFLAGS" -e "CPPFLAGS=$CPPFLAGS" -v $(pwd):/TileDB-Java -t lib_builder_2010 /TileDB-Java/ci/build.sh | |
cp ./build/tiledb_jni/*.so ./build/install/lib/*.so ./build/install/lib64/*.so binaries_$RUNNER_OS/ | |
fi | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
if [[ "$(uname -m)" == "arm64" ]]; then | |
mkdir -p binaries_apple_silicon/arm | |
./gradlew -PTILEDB_AZURE=ON assemble | |
cp ./build/tiledb_jni/arm/*.dylib ./build/install/arm/lib/*.dylib binaries_apple_silicon/arm | |
else | |
./gradlew -PTILEDB_AZURE=ON assemble | |
cp ./build/tiledb_jni/*.dylib ./build/install/lib/*.dylib binaries_$RUNNER_OS/ | |
fi | |
fi | |
name: 'Build and Upload (Ubuntu and OSX)' | |
- run: | | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
if [[ "$(uname -m)" == "arm64" ]]; then | |
tar cvf tiledb-apple-silicon.gz.tar binaries_apple_silicon/ | |
else | |
tar cvf tiledb-$RUNNER_OS.gz.tar binaries_$RUNNER_OS/ | |
fi | |
else | |
tar cvf tiledb-$RUNNER_OS.gz.tar binaries_$RUNNER_OS/ | |
fi | |
name: Archive_files | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Upload-Artifact-Linux | |
path: '*.gz.tar' | |
if: runner.os == 'Linux' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Upload-Artifact-Mac | |
path: '*.gz.tar' | |
if: runner.os == 'macOS' && (runner.arch == 'X86' || runner.arch == 'X64') | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Upload-Artifact-Mac-Arm | |
path: '*.gz.tar' | |
if: runner.os == 'macOS' && (runner.arch == 'ARM' || runner.arch == 'arm64') | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON | |
ORG_GRADLE_PROJECT_TILEDB_S3: ON | |
Mock-Release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [Create_Artifacts_Ubuntu_MacOS, Create_Artifacts_Windows] | |
name: Mock-Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set-up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
check-latest: true | |
- uses: actions/download-artifact@v4 | |
- name: assemble | |
run: | | |
chmod +x ./ci/assemble_full_jar.sh | |
./ci/assemble_full_jar.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: jars | |
path: ./jars | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON | |
ORG_GRADLE_PROJECT_TILEDB_S3: ON | |
Test-Mock-Release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [ Mock-Release ] | |
name: Test-Mock-Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-13, macos-14, windows-2019 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set-up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
check-latest: true | |
- uses: actions/download-artifact@v4 | |
with: | |
name: jars | |
- shell: bash | |
name: Run examples with release jar | |
run: | | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
brew install coreutils; | |
fi | |
rm *javadoc* *sources* | |
p=$(realpath *.jar) | |
# Change directory to the specified path | |
cd src/main/java/examples/io/tiledb/java/api | |
# Compile all Java files in the current directory using the classpath obtained earlier | |
javac -cp "$p" *.java | |
# Loop through all compiled Java files and run them | |
for x in $(ls -1 *.java | sed 's/.java//'); do | |
echo $x; | |
class_name=examples.io.tiledb.java.api.$x; | |
java -cp "$p" $class_name; | |
done | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON | |
ORG_GRADLE_PROJECT_TILEDB_S3: ON | |
Actual-Release: | |
needs: [ Test-Mock-Release ] | |
name: Actual-Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- name: assemble | |
run: | | |
chmod +x ./ci/assemble_full_jar.sh; | |
./ci/assemble_full_jar.sh; | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: jars/*.jar | |
tag_name: ${{ github.event.release.tag_name }} | |
name: ${{ github.event.release.tag_name }} | |
body: ${{steps.github_release.outputs.changelog}} | |
draft: false | |
prerelease: false | |
- name: Upload to maven | |
run: | | |
chmod +x ./ci/upload_to_maven.sh | |
./ci/upload_to_maven.sh | |
shell: bash | |
env: | |
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
GPG_SECRET_KEYS_ENC: ${{ secrets.GPG_SECRET_KEYS_ENC }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
env: | |
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON | |
ORG_GRADLE_PROJECT_TILEDB_S3: ON |