-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (79 loc) · 2.31 KB
/
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
94
95
name: Diplomat CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check rustfmt
run: cargo fmt --all -- --check
- name: Check clippy
run: cargo clippy --all-targets --all-features -- -D warnings
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install MSRV Rust
run: rustup install 1.71 --profile minimal
- name: Check
run: cargo +1.71 check -p diplomat-java -p jextrsact -p feature-tests
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-make
uses: taiki-e/install-action@cargo-make
- name: Set up JDK 22 for x64
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
architecture: x64
cache: maven
- name: Test Java
run: cargo make test-feature
test-gen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-make
uses: taiki-e/install-action@cargo-make
- name: Install curl
run: sudo apt-get update && sudo apt-get install -y curl
- name: Set up JDK 22 for x64
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
architecture: x64
cache: maven
- name: get jextract
run: curl -o /opt/jextract.tgz https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_linux-x64_bin.tar.gz
- name: config jextract
run: tar -xzf /opt/jextract.tgz -C /opt/
- name: Add jextract to path
run: echo "/opt/jextract-22/bin" >> $GITHUB_PATH
- name: Run generated java
run: cargo make gen-feature
check-latest-diplomat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check rustfmt
run: cargo add -p diplomat-java --git https://github.com/rust-diplomat/diplomat.git --branch main diplomat-tool diplomat-runtime diplomat_core
- name: Check clippy
run: cargo build