Repository navigation
85 lines (82 loc) · 2.62 KB
/
Copy pathlib-java-csharp-sdk-ci.yml
File metadata and controls
85 lines (82 loc) · 2.62 KB
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
# CI workflow for Java & C# Runtime SDK FFI crates.
# Runs linting and a single-platform build + test for fast feedback on push/PR.
# The full cross-platform matrix runs in the release workflow.
name: Java & C# Runtime SDK CI
on:
push:
branches:
- main
paths:
- 'libs/runtime/sdk/bindgen-ffi/**'
- 'libs/runtime/sdk/bindgen-ffi-java/**'
- 'libs/runtime/sdk/bindings/**'
- 'libs/runtime/sdk/runtime-bindings/**'
- 'libs/runtime/sdk/java/**'
- 'libs/runtime/sdk/csharp/**'
- '!**/*.md'
- '!LICENSE'
- '!**/*.gitignore'
- '!.editorconfig'
- '!docs/**'
pull_request:
paths:
- 'libs/runtime/sdk/bindgen-ffi/**'
- 'libs/runtime/sdk/bindgen-ffi-java/**'
- 'libs/runtime/sdk/bindings/**'
- 'libs/runtime/sdk/runtime-bindings/**'
- 'libs/runtime/sdk/java/**'
- 'libs/runtime/sdk/csharp/**'
- '!**/*.md'
- '!LICENSE'
- '!**/*.gitignore'
- '!.editorconfig'
- '!docs/**'
workflow_dispatch: {}
jobs:
linting:
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/runtime
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -D warnings
build-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/runtime
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Build FFI and JNI
run: cargo build --release -p celerity_runtime_bindgen_ffi -p celerity_runtime_bindgen_ffi_java
- name: Test .NET bindings
run: cargo run --bin celerity-runtime-bindings -- --dotnet
env:
CELERITY_VARIABLE_secretStoreId: test-secret-store
CELERITY_VARIABLE_certificateId: test-certificate
CELERITY_VARIABLE_logLevel: debug
CELERITY_VARIABLE_paymentApiSecret: test-payment-api-secret
- name: Test Java bindings
run: cargo run --bin celerity-runtime-bindings -- --java
env:
CELERITY_VARIABLE_secretStoreId: test-secret-store
CELERITY_VARIABLE_certificateId: test-certificate
CELERITY_VARIABLE_logLevel: debug
CELERITY_VARIABLE_paymentApiSecret: test-payment-api-secret