Skip to content

Add lazy implementation of DataFrame Interchange Protocol to SqlDataset #105

Add lazy implementation of DataFrame Interchange Protocol to SqlDataset

Add lazy implementation of DataFrame Interchange Protocol to SqlDataset #105

Workflow file for this run

name: java
on:
pull_request:
types: [ opened, synchronize ]
jobs:
build-test-java-linux64:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build jni
run: cargo build -p vegafusion-jni --release --features=protobuf-src
- name: gradle test
run: |
cd java
./gradlew test -i
env:
VEGAFUSION_JNI_LIBRARY: /home/runner/work/vegafusion/vegafusion/target/release/libvegafusion_jni.so
- name: Copy native lib
run: |
mkdir -p native/linux-64
cp target/release/libvegafusion_jni.so native/linux-64
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: jni-native
path: |
native
build-test-java-osx64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build jni
run: cargo build -p vegafusion-jni --release --features=protobuf-src
- name: gradle test
run: |
cd java
./gradlew test -i
env:
VEGAFUSION_JNI_LIBRARY: /Users/runner/work/vegafusion/vegafusion/target/release/libvegafusion_jni.dylib
- name: Copy native lib
run: |
mkdir -p native/osx-64
cp target/release/libvegafusion_jni.dylib native/osx-64
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: jni-native
path: |
native
build-test-java-osx-arm64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download Apple Silicon toolchain
run: |
rustup target add aarch64-apple-darwin
- name: Build jni
run: cargo build -p vegafusion-jni --release --features=protobuf-src --target aarch64-apple-darwin
- name: Copy native lib
run: |
mkdir -p native/osx-arm64
cp target/aarch64-apple-darwin/release/libvegafusion_jni.dylib native/osx-arm64
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: jni-native
path: |
native
build-test-java-win64:
runs-on: windows-2022
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install protoc with choco
run: choco install --yes protoc
- name: Build jni
run: cargo build -p vegafusion-jni --release
- name: Show release files
run: |
Get-ChildItem -Path target/release -Recurse
- name: gradle test
run: |
cd java
./gradlew test -i
env:
VEGAFUSION_JNI_LIBRARY: D:/a/vegafusion/vegafusion/target/release/vegafusion_jni.dll
- name: Copy native lib
run: |
mkdir -p native/win-64
cp target/release/vegafusion_jni.dll native/win-64
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: jni-native
path: |
native
build-jar:
runs-on: ubuntu-20.04
needs:
- build-test-java-linux64
- build-test-java-osx64
- build-test-java-osx-arm64
- build-test-java-win64
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download jni libs
uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # pin@v2
with:
name: jni-native
path: jni-native
- name: Build jar
env:
VEGAFUSION_JNI_LIBRARIES: /home/runner/work/vegafusion/vegafusion/jni-native
run: |
cd java
./gradlew jar
- name: Upload jar
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: jar
path: |
java/lib/build/libs/vegafusion-*.jar
try-jar:
strategy:
matrix:
os:
- ubuntu-20.04
- macos-11
- windows-2022
runs-on: ${{ matrix.os }}
needs: [ build-jar ]
steps:
- name: Install Java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # pin@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download jar
uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # pin@v2
with:
name: jar
path: .
- name: Run jar (non-Windows)
if: ${{ runner.os != 'Windows' }}
run: |
java -jar vegafusion-*.jar
- name: Run jar (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$jarFile = Get-ChildItem -Path .\ -Filter "vegafusion-*.jar" | Select-Object -First 1
java -jar $jarFile