Skip to content

Chore/java publish

Chore/java publish #99

Workflow file for this run

---
name: Java build
on:
push:
branches:
- main
paths:
- 'java-engine/src/**/*.java'
- 'java-engine/build.gradle.kts'
# Build in main if anything changes in yggdrasil or the ffi layer
- 'unleash-yggdrasil/src/**/*.rs'
- 'yggdrasilffi/src/**/*.rs'
pull_request:
paths:
- 'java-engine/**/*.java'
jobs:
build-java:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
## begin build yggdrasil (maybe this can be a separate job)
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile default
rustup show
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Build yggdrasil
run: cargo build --release
## end build yggdrasil
## Test requirements
- name: Get client spec
uses: actions/checkout@v3
with:
repository: Unleash/client-specification
ref: v5.1.0
path: client-specification
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 21
cache: 'gradle'
distribution: 'temurin'
- name: Check Code Format
working-directory: ./java-engine
run: ./gradlew spotlessCheck
- name: Run tests
working-directory: ./java-engine
run: ./gradlew test