Repository navigation
413 lines (333 loc) · 22.3 KB
/
Copy pathjava.yml
File metadata and controls
413 lines (333 loc) · 22.3 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
name: Java bindings
on:
push:
branches: [main]
paths:
- 'bindings/java/**'
- 'crates/convex-ffi/**'
- 'crates/convex-analytics/**'
- 'crates/convex-bonds/**'
- 'crates/convex-core/**'
- 'crates/convex-curves/**'
- 'crates/convex-math/**'
- 'crates/convex/**'
- 'crates/convex-rates/**'
- 'crates/convex-credit/**'
- 'crates/convex-portfolio/**'
- 'tests/fixtures/library/**'
- 'tests/fixtures/packed.*'
- 'tools/fixtures.py'
- 'tests/scripts/library_parity.py'
- 'tests/scripts/library_operations_parity.py'
- 'tests/scripts/library_cash_parity.py'
- 'tests/scripts/library_rate_helpers_parity.py'
- 'tests/scripts/library_credit_helpers_parity.py'
- 'tests/scripts/library_cash_helpers_parity.py'
- 'tests/scripts/library_workout_parity.py'
- 'tests/scripts/floating_workout_parity.py'
- 'tests/scripts/icma_parity.py'
- 'tests/scripts/icma_government_parity.py'
- 'tests/scripts/icma_workout_parity.py'
- 'tests/scripts/icma_helpers_parity.py'
- 'tests/scripts/icma_risk_parity.py'
- 'tests/scripts/graph_hedge_parity.py'
- 'tests/scripts/cash_basis_hedge_parity.py'
- 'tests/scripts/recovery_hedge_parity.py'
- 'tests/scripts/delivery_hedge_parity.py'
- 'tests/scripts/delivery_hedge_census.py'
- 'tests/scripts/mixed_scenario*.py'
- 'tests/scripts/causal_pnl*.py'
- 'tests/scripts/cohort_pnl*.py'
- 'tests/scripts/residual_pnl*.py'
- 'tests/scripts/lot_pnl*.py'
- 'tests/scripts/claim_pnl*.py'
- 'tests/scripts/physical_partition_pnl*.py'
- 'tests/scripts/custody_lineage_pnl*.py'
- 'tests/scripts/dated_cash_pnl*.py'
- 'tests/scripts/pending_cash_pnl*.py'
- 'tests/scripts/child_cash_pnl*.py'
- 'tests/scripts/child_maturity_pnl*.py'
- 'tests/scripts/concurrent_claims_pnl*.py'
- 'tests/scripts/settled_claims_pnl*.py'
- 'tests/fixtures/library/mixed-scenario*.json'
- 'tests/fixtures/library/causal-pnl*.json'
- 'tests/fixtures/library/cohort-pnl*.json'
- 'tests/fixtures/library/residual-pnl*.json'
- 'tests/fixtures/library/lot-pnl*.json'
- 'tests/fixtures/library/claim-pnl*.json'
- 'tests/fixtures/library/physical-partition-pnl*.json'
- 'tests/fixtures/library/custody-lineage-pnl*.json'
- 'tests/fixtures/library/dated-cash-pnl*.json'
- 'tests/fixtures/library/pending-cash-pnl*.json'
- 'tests/fixtures/library/child-cash-pnl*.json'
- 'tests/fixtures/library/child-maturity-pnl*.json'
- 'tests/fixtures/library/concurrent-claims-pnl*.json'
- 'tests/fixtures/library/settled-claims-pnl*.json'
- 'tests/scripts/optional_graph_hedge_parity.py'
- 'tests/scripts/library_curve_families_parity.py'
- 'tests/scripts/library_curve_methods_parity.py'
- 'tests/scripts/library_ufr_parity.py'
- 'tests/scripts/library_host_census.py'
- 'tests/scripts/library_monotone_parity.py'
- 'tools/library/api-capabilities.json'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/java.yml'
pull_request:
branches: [main]
paths:
- 'bindings/java/**'
- 'crates/convex-ffi/**'
- 'crates/convex-analytics/**'
- 'crates/convex-bonds/**'
- 'crates/convex-core/**'
- 'crates/convex-curves/**'
- 'crates/convex-math/**'
- 'crates/convex/**'
- 'crates/convex-rates/**'
- 'crates/convex-credit/**'
- 'crates/convex-portfolio/**'
- 'tests/fixtures/library/**'
- 'tests/fixtures/packed.*'
- 'tools/fixtures.py'
- 'tests/scripts/library_parity.py'
- 'tests/scripts/library_operations_parity.py'
- 'tests/scripts/library_cash_parity.py'
- 'tests/scripts/library_rate_helpers_parity.py'
- 'tests/scripts/library_credit_helpers_parity.py'
- 'tests/scripts/library_cash_helpers_parity.py'
- 'tests/scripts/library_workout_parity.py'
- 'tests/scripts/floating_workout_parity.py'
- 'tests/scripts/icma_parity.py'
- 'tests/scripts/icma_government_parity.py'
- 'tests/scripts/icma_workout_parity.py'
- 'tests/scripts/icma_helpers_parity.py'
- 'tests/scripts/icma_risk_parity.py'
- 'tests/scripts/graph_hedge_parity.py'
- 'tests/scripts/cash_basis_hedge_parity.py'
- 'tests/scripts/recovery_hedge_parity.py'
- 'tests/scripts/delivery_hedge_parity.py'
- 'tests/scripts/delivery_hedge_census.py'
- 'tests/scripts/mixed_scenario*.py'
- 'tests/scripts/causal_pnl*.py'
- 'tests/scripts/cohort_pnl*.py'
- 'tests/scripts/residual_pnl*.py'
- 'tests/scripts/lot_pnl*.py'
- 'tests/scripts/claim_pnl*.py'
- 'tests/scripts/physical_partition_pnl*.py'
- 'tests/scripts/custody_lineage_pnl*.py'
- 'tests/scripts/dated_cash_pnl*.py'
- 'tests/scripts/pending_cash_pnl*.py'
- 'tests/scripts/child_cash_pnl*.py'
- 'tests/scripts/child_maturity_pnl*.py'
- 'tests/scripts/concurrent_claims_pnl*.py'
- 'tests/scripts/settled_claims_pnl*.py'
- 'tests/fixtures/library/mixed-scenario*.json'
- 'tests/fixtures/library/causal-pnl*.json'
- 'tests/fixtures/library/cohort-pnl*.json'
- 'tests/fixtures/library/residual-pnl*.json'
- 'tests/fixtures/library/lot-pnl*.json'
- 'tests/fixtures/library/claim-pnl*.json'
- 'tests/fixtures/library/physical-partition-pnl*.json'
- 'tests/fixtures/library/custody-lineage-pnl*.json'
- 'tests/fixtures/library/dated-cash-pnl*.json'
- 'tests/fixtures/library/pending-cash-pnl*.json'
- 'tests/fixtures/library/child-cash-pnl*.json'
- 'tests/fixtures/library/child-maturity-pnl*.json'
- 'tests/fixtures/library/concurrent-claims-pnl*.json'
- 'tests/fixtures/library/settled-claims-pnl*.json'
- 'tests/scripts/optional_graph_hedge_parity.py'
- 'tests/scripts/library_curve_families_parity.py'
- 'tests/scripts/library_curve_methods_parity.py'
- 'tests/scripts/library_ufr_parity.py'
- 'tests/scripts/library_host_census.py'
- 'tests/scripts/library_monotone_parity.py'
- 'tools/library/api-capabilities.json'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/java.yml'
# Build + test only; no repo writes.
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
# Linux x86_64 build + test. The release workflow extends this into a full
# OS/arch matrix and assembles every cdylib into the natives jar.
verify:
name: Build native + mvn verify (linux-x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Materialize packed fixtures
run: python3 tools/fixtures.py materialize
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
# `excel` profile = panic=unwind; see [profile.excel] in Cargo.toml.
- name: Build convex-ffi cdylib
run: cargo build --locked -p convex-ffi --profile excel -p convex --lib --example library_workflow --features convex/schemars
- name: Build supplemental native operation consumer
run: cargo build --locked --profile excel -p convex --example library_operations --features schemars
- name: Build native full cash quotation consumer
run: cargo build --locked --profile excel -p convex --example library_cash --features schemars
- name: Build native full rate-helper quotation consumer
run: cargo build --locked --profile excel -p convex --example library_rate_helpers --features schemars
- name: Build native full CDS-helper quotation consumer
run: cargo build --locked --profile excel -p convex --example library_credit_helpers --features schemars
- name: Build native full cash-helper quotation consumer
run: cargo build --locked --profile excel -p convex --example library_cash_helpers --features schemars
- name: Build native complete floating workout consumer
run: cargo build --locked --profile excel -p convex --example floating_workout --features schemars
- name: Build contextual ICMA host consumer
run: cargo build --locked --profile excel -p convex --example icma_quotation --features schemars
- name: Build contextual government native expectations
run: cargo build --locked --profile excel -p convex --example icma_government --features schemars
- name: Build contextual workout native expectations
run: cargo build --locked --profile excel -p convex --example icma_workout --features schemars
- name: Build contextual ICMA helper Java consumer
run: cargo build --locked --profile excel -p convex --example icma_helpers --features schemars
- name: Build direct ICMA risk and hedge Java consumer
run: cargo build --locked --profile excel -p convex --example icma_risk --features schemars
- name: Build graph hedge Java consumer
run: cargo build --locked --profile excel -p convex --example graph_hedge --features schemars
- name: Build issuer cash hedge Java consumer
run: cargo build --locked --profile excel -p convex --example cash_basis_hedge --features schemars
- name: Build recovery mixed hedge Java consumer
run: cargo build --locked --profile excel -p convex --example recovery_hedge --features schemars
- name: Build mixed-book scenario Java consumer
run: cargo build --locked --profile excel -p convex --example mixed_scenario --features schemars
- name: Build causal lifecycle and cash consumer
run: cargo build --locked --profile excel -p convex --example causal_pnl --features schemars
- name: Build complete cohort cash and physical delivery consumer
run: cargo build --locked --profile excel -p convex --example cohort_pnl --features schemars
- name: Build residual claim and partial receipt consumer
run: cargo build --locked --profile excel -p convex --example residual_pnl --features schemars
- name: Build complete original lot amendment Java expectations
run: cargo build --locked --profile excel -p convex --example lot_pnl --features schemars
- name: Build original cash transfer Java expectations
run: cargo build --locked --profile excel -p convex --example claim_pnl --features schemars
- name: Build physical custody Java controls
run: cargo build --locked --profile excel -p convex --example physical_partition_pnl --features schemars
- name: Build successive custody disposal Java controls
run: cargo build --locked --profile excel -p convex --example custody_lineage_pnl --features schemars
- name: Build dated cash Java consumer
run: cargo build --locked --profile excel -p convex --example dated_cash_pnl --features schemars
- name: Build pending delivery cash Java consumer
run: cargo build --locked --profile excel -p convex --example pending_cash_pnl --features schemars
- name: Build child cash transport consumer
run: cargo build --locked --profile excel -p convex --example child_cash_pnl --features schemars
- name: Build child maturity transport consumer
run: cargo build --locked --profile excel -p convex --example child_maturity_pnl --features schemars
- name: Build concurrent claims transport consumer
run: cargo build --locked --profile excel -p convex --example concurrent_claims_pnl --features schemars
- name: Build full settlement transport consumer
run: cargo build --locked --profile excel -p convex --example settled_claims_pnl --features schemars
- name: Build full delivery basket hedge Java consumer
run: cargo build --locked --profile excel -p convex --example delivery_hedge --features schemars
- name: Build guarded optional graph hedge Java consumer
run: cargo build --locked --profile excel -p convex --example optional_graph_hedge --features schemars
- name: Build native complete workout consumer
run: cargo build --locked --profile excel -p convex --example library_workout --features schemars
- name: Build native complete curve-family consumer
run: cargo build --locked --profile excel -p convex --example library_curve_families --features schemars
- name: Build native explicit curve-method consumer
run: cargo build --locked --profile excel -p convex --example library_curve_methods --features schemars
- name: Build native complete UFR consumer
run: cargo build --locked --profile excel -p convex --example library_ufr --features schemars
- name: Build native monotone and complete host consumers
run: cargo build --locked --profile excel -p convex --example library_monotone --example library_host_census --features schemars
- name: Stage native library
run: |
dest=bindings/java/src/main/resources/native/linux-x86_64
mkdir -p "$dest"
cp target/excel/libconvex_ffi.so "$dest/"
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '22'
cache: maven
- name: Generate fresh native adapter expectations
run: python3 tests/scripts/library_parity.py prepare --binary target/excel/examples/library_workflow --output bindings/java/target/library-parity.json
- name: Generate fresh native operation adapter expectations
run: python3 tests/scripts/library_operations_parity.py prepare --binary target/excel/examples/library_operations --output bindings/java/target/library-operations-parity.json
- name: Generate fresh native full cash adapter expectations
run: python3 tests/scripts/library_cash_parity.py prepare --binary target/excel/examples/library_cash --output bindings/java/target/library-cash-parity.json
- name: Generate fresh native full rate-helper adapter expectations
run: python3 tests/scripts/library_rate_helpers_parity.py prepare --binary target/excel/examples/library_rate_helpers --output bindings/java/target/library-rate-helpers-parity.json
- name: Generate fresh native full CDS-helper adapter expectations
run: python3 tests/scripts/library_credit_helpers_parity.py prepare --binary target/excel/examples/library_credit_helpers --output bindings/java/target/library-credit-helpers-parity.json
- name: Generate fresh native full cash-helper adapter expectations
run: python3 tests/scripts/library_cash_helpers_parity.py prepare --binary target/excel/examples/library_cash_helpers --output bindings/java/target/library-cash-helpers-parity.json
- name: Generate fresh native floating workout adapter expectations
run: python3 tests/scripts/floating_workout_parity.py --binary target/excel/examples/floating_workout --output bindings/java/target/floating-workout-parity.json
- name: Prepare fresh contextual ICMA host transport expectations
run: python3 tests/scripts/icma_parity.py --binary target/excel/examples/icma_quotation --output bindings/java/target/icma-parity.json
- name: Generate contextual government Java expectations
run: python3 tests/scripts/icma_government_parity.py --binary target/excel/examples/icma_government --output bindings/java/target/icma-government-parity.json
- name: Generate contextual workout Java expectations
run: python3 tests/scripts/icma_workout_parity.py --binary target/excel/examples/icma_workout --output bindings/java/target/icma-workout-parity.json
- name: Generate contextual ICMA helper Java expectations
run: python3 tests/scripts/icma_helpers_parity.py --binary target/excel/examples/icma_helpers --output bindings/java/target/icma-helpers-parity.json
- name: Generate direct ICMA risk and hedge Java expectations
run: python3 tests/scripts/icma_risk_parity.py --binary target/excel/examples/icma_risk --output bindings/java/target/icma-risk-parity.json
- name: Generate graph hedge Java expectations
run: python3 tests/scripts/graph_hedge_parity.py --binary target/excel/examples/graph_hedge --output bindings/java/target/graph-hedge-parity.json
- name: Generate issuer cash hedge Java expectations
run: python3 tests/scripts/cash_basis_hedge_parity.py --binary target/excel/examples/cash_basis_hedge --output bindings/java/target/cash-basis-hedge-parity.json
- name: Generate recovery mixed hedge Java expectations
run: python3 tests/scripts/recovery_hedge_parity.py --binary target/excel/examples/recovery_hedge --output bindings/java/target/recovery-hedge-parity.json
- name: Generate mixed-book scenario Java expectations
run: python3 tests/scripts/mixed_scenario_parity.py --binary target/excel/examples/mixed_scenario --output bindings/java/target/mixed-scenario-parity.json
- name: Generate complete causal cash transport corpus
run: python3 tests/scripts/causal_pnl_parity.py --binary target/excel/examples/causal_pnl --output bindings/java/target/causal-pnl-parity.json
- name: Complete cohort cash and physical delivery parity
run: python3 tests/scripts/cohort_pnl_admitted_parity.py --binary target/excel/examples/cohort_pnl --output bindings/java/target/cohort-pnl-parity.json
- name: Original residual claim and partial receipt parity
run: python3 tests/scripts/residual_pnl_parity.py --binary target/excel/examples/residual_pnl --output bindings/java/target/residual-pnl-parity.json
- name: Complete original lot amendment Java transport
run: python3 tests/scripts/lot_pnl_parity.py --binary target/excel/examples/lot_pnl --output bindings/java/target/lot-pnl-parity.json
- name: Original cash transfer Java transport
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/claim_pnl_parity.py --binary target/excel/examples/claim_pnl --output bindings/java/target/claim-pnl-parity.json
- name: Physical custody and invoice Java transport
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/physical_partition_pnl_parity.py --binary target/excel/examples/physical_partition_pnl --output bindings/java/target/physical-partition-pnl-parity.json
- name: Successive custody disposal Java transport
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/custody_lineage_pnl_parity.py --binary target/excel/examples/custody_lineage_pnl --output bindings/java/target/custody-lineage-pnl-parity.json
- name: Prepare dated cash Java transport controls
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/dated_cash_pnl_parity.py --binary target/excel/examples/dated_cash_pnl --output bindings/java/target/dated-cash-pnl-parity.json
- name: Retain pending delivery cash native envelopes for Java transport
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/pending_cash_pnl_parity.py --binary target/excel/examples/pending_cash_pnl --output bindings/java/target/pending-cash-pnl-parity.json
- name: Generate fresh child cash Java parity
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/child_cash_pnl_parity.py --binary target/excel/examples/child_cash_pnl --output bindings/java/target/child-cash-pnl-parity.json
- name: Generate fresh child maturity Java parity
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/child_maturity_pnl_parity.py --binary target/excel/examples/child_maturity_pnl --output bindings/java/target/child-maturity-pnl-parity.json
- name: Generate fresh concurrent claims Java parity
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/concurrent_claims_pnl_parity.py --binary target/excel/examples/concurrent_claims_pnl --output bindings/java/target/concurrent-claims-pnl-parity.json
- name: Generate fresh full settlement Java parity
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/settled_claims_pnl_parity.py --binary target/excel/examples/settled_claims_pnl --output bindings/java/target/settled-claims-pnl-parity.json
- name: Generate full delivery basket hedge Java expectations
run: python3 tests/scripts/delivery_hedge_parity.py --binary target/excel/examples/delivery_hedge --output bindings/java/target/delivery-hedge-parity.json
- name: Generate guarded optional graph hedge Java expectations
run: python3 tests/scripts/optional_graph_hedge_parity.py --binary target/excel/examples/optional_graph_hedge --output bindings/java/target/optional-graph-hedge-parity.json
- name: Generate fresh native full workout adapter expectations
run: python3 tests/scripts/library_workout_parity.py prepare --binary target/excel/examples/library_workout --output bindings/java/target/library-workout-parity.json
- name: Generate fresh native full curve-family adapter expectations
run: python3 tests/scripts/library_curve_families_parity.py prepare --binary target/excel/examples/library_curve_families --output bindings/java/target/library-curve-families-parity.json
- name: Generate fresh native curve-method adapter expectations
run: python3 tests/scripts/library_curve_methods_parity.py prepare --binary target/excel/examples/library_curve_methods --output bindings/java/target/library-curve-methods-parity.json
- name: Generate fresh native full UFR adapter expectations
run: python3 tests/scripts/library_ufr_parity.py prepare --binary target/excel/examples/library_ufr --output bindings/java/target/library-ufr-parity.json
- name: Generate fresh monotone Java expectations
run: python3 tests/scripts/library_monotone_parity.py prepare --binary target/excel/examples/library_monotone --output bindings/java/target/library-monotone-parity.json
- name: Retain every current complete request for actual Java FFM
run: PYTHONDONTWRITEBYTECODE=1 python3 tests/scripts/library_host_census.py --binary target/excel/examples/library_host_census --output-dir bindings/java/target/library-host-census
- name: Build and retain complete Treasury bill Java expectations
run: |
cargo build --locked --profile excel -p convex --example treasury_bill
python3 tests/scripts/treasury_bill_parity.py prepare --binary target/excel/examples/treasury_bill --output bindings/java/target/treasury-bill-parity.json
- name: Maven verify
run: mvn -B -f bindings/java/pom.xml verify