forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) · 2.47 KB
/
java.yml
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
name: Java CI
on:
push:
branches: ["main"]
paths:
- glide-core/**
- submodules/**
- "java/**"
- ".github/workflows/java.yml"
pull_request:
paths:
- glide-core/**
- submodules/**
- "java/**"
- ".github/workflows/java.yml"
# Run only most latest job on a branch and cancel previous ones
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-and-test-java-client:
strategy:
# Run all jobs
fail-fast: false
matrix:
java:
- 11
- 17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
- name: Build rust part
working-directory: java
run: cargo build --release
- name: Start Redis
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack
- name: Build java part
working-directory: java
run: ./gradlew --continue build
- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: test-reports-${{ matrix.java }}
path: |
java/client/build/reports/**
java/integTest/build/reports/**
# TODO - enable once benchmark works
# - uses: ./.github/workflows/test-benchmark
# with:
# language-flag: -java
lint-rust:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./java
name: lint java rust