Skip to content

Commit

Permalink
Add github workflow for Java JNI project
Browse files Browse the repository at this point in the history
  • Loading branch information
beinan committed Feb 16, 2024
1 parent 96f6cb6 commit b735c42
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Run Java JNI Tests
on:
push:
branches:
- main
pull_request:
paths:
- java/**
- .github/workflows/java.yml

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
java-version: 8
- os: ubuntu-22.04
java-version: 11
- os: ubuntu-22.04
java-version: 17
- os: ubuntu-22.04
java-version: 11
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} + Java ${{ matrix.java-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
workspaces: java/java-jni
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: 'maven'

- name: Build with Maven
run: mvn package -DskipTests=true

- name: Running tests
run: mvn test

0 comments on commit b735c42

Please sign in to comment.