forked from lance-format/lance
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (95 loc) · 2.92 KB
/
java.yml
File metadata and controls
99 lines (95 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build and Run Java JNI Tests
on:
push:
branches:
- main
pull_request:
paths:
- java/**
- rust/**
- .github/workflows/java.yml
env:
# This env var is used by Swatinem/rust-cache@v2 for the cache
# key, so we set it to make sure it is always consistent.
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
jobs:
rust-clippy-fmt:
runs-on: ubuntu-24.04
name: Rust Clippy and Fmt Check
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
lance
java/lance-jni -> ../target/rust-maven-plugin/lance-jni
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- uses: rui314/setup-mold@v1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run cargo fmt
working-directory: java/lance-jni
run: cargo fmt --check
- name: Rust Clippy
working-directory: java/lance-jni
run: cargo clippy --all-targets -- -D warnings
build-and-test-java:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
matrix:
java-version: [8, 11, 17]
name: Build and Test with Java ${{ matrix.java-version }}
services:
localstack:
image: localstack/localstack:4.0
ports:
- 4566:4566
env:
SERVICES: s3,dynamodb,kms
AWS_ACCESS_KEY_ID: ACCESS_KEY
AWS_SECRET_ACCESS_KEY: SECRET_KEY
options: >-
--health-cmd "curl -s http://localhost:4566/_localstack/health"
--health-interval 5s
--health-timeout 3s
--health-retries 3
--health-start-period 10s
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
# pin the toolchain version to avoid surprises
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- uses: rui314/setup-mold@v1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Checkout repository
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
workspaces: java/lance-jni -> ../target/rust-maven-plugin/lance-jni
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: "maven"
- name: Running code style check with Java ${{ matrix.java-version }}
working-directory: java
run: |
mvn spotless:check
- name: Running tests with Java ${{ matrix.java-version }}
working-directory: java
env:
LANCE_INTEGRATION_TEST: "1"
run: |
mvn install