This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
93 lines (81 loc) · 2.6 KB
/
java-bindings-ci.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
89
90
91
92
93
name: Java Bindings CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
workflow_dispatch:
pull_request:
paths:
- 'packages/rust-core/common/**'
- 'packages/rust-core/java/**'
- 'packages/rust-core/Cargo.toml'
- '.github/workflows/java-bindings-ci.yml'
- '.github/workflows/java-bindings-build-common.yml'
- '.github/workflows/codeql.yml'
push:
branches: [main]
paths:
- 'packages/rust-core/common/**'
- 'packages/rust-core/java/**'
- 'packages/rust-core/Cargo.toml'
- '.github/workflows/java-bindings-ci.yml'
- '.github/workflows/java-bindings-build-common.yml'
- '.github/workflows/codeql.yml'
defaults:
run:
working-directory: packages/rust-core/java
env:
RUST_BACKTRACE: full
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: true
jobs:
codeql:
name: java-bindings-ci-codeql
uses: ./.github/workflows/codeql.yml
with:
language: java-kotlin
working-directory: packages/rust-core/java
lint:
runs-on: ubuntu-latest
name: java-bindings-ci-lint
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Install
run: ./mvnw clean compile spotless:check -DskipTests -D"gpg.skip"
build:
name: java-bindings-ci-build
uses: ./.github/workflows/java-bindings-build-common.yml
with:
publish: false
ci:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
name: java-bindings-ci-test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
cache: 'maven'
- name: Install
run: ./mvnw clean install -DskipTests -D"gpg.skip"
- name: Test
# `mvn install` and `mvn artifact:compare` are required to verify reproducible builds:
# https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
run: ./mvnw verify artifact:compare -D"gpg.skip"
env:
MAVEN_OPTS: '-server -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true'