Skip to content

Commit 2ba0e89

Browse files
dfa1claude
andauthored
fix: smoke test compile error, run smoke after release (#109)
decompressContextAdvanced() still passed a raw int where ZstdDecompressContext.decompress() now requires a ZstdByteSize (the v0.12 domain-primitive refactor), breaking every release-smoke leg. Also trigger release-smoke.yml automatically once publish.yml completes, instead of relying solely on the weekly schedule, so a broken release is caught right after it ships. Fixes #107 Co-authored-by: Claude Sonnet 5 <[email protected]>
1 parent b34e533 commit 2ba0e89

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/smoke/src/test/java/SmokeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void decompressContextAdvanced() {
235235

236236
dctx.reset(ZstdResetDirective.PARAMETERS);
237237
dctx.parameter(ZstdDecompressParameter.WINDOW_LOG_MAX, 24);
238-
byte[] restoredAfterReset = dctx.decompress(cctx.compress(original), original.length);
238+
byte[] restoredAfterReset = dctx.decompress(cctx.compress(original), new ZstdByteSize(original.length));
239239
checkArrayEquals(original, restoredAfterReset, "decompress after PARAMETERS reset + parameter() mismatch");
240240
}
241241
}

.github/workflows/release-smoke.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Release smoke test
33
# Verifies a PUBLISHED release on Maven Central actually loads and runs on every
44
# supported OS/arch — one runner per native classifier. Pulls the release jars
55
# from Central (no source build, no submodule, no zig), so it tests exactly what
6-
# users consume. Trigger manually and pass the version to check.
6+
# users consume. Runs automatically after every publish (see #107), weekly as a
7+
# standing check, and can also be triggered manually with an explicit version.
78

89
on:
910
workflow_dispatch:
@@ -12,6 +13,9 @@ on:
1213
description: Version to smoke-test. Leave blank to use the latest release on Maven Central.
1314
required: false
1415
default: ""
16+
workflow_run:
17+
workflows: ["Publish to Maven Central"]
18+
types: [completed]
1519
schedule:
1620
# Weekly, Mondays 06:00 UTC. No input on scheduled runs, so the resolve job
1721
# picks the latest release on Maven Central — catches Central / runner-image
@@ -21,11 +25,19 @@ on:
2125
jobs:
2226
resolve:
2327
name: resolve version
28+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
2429
runs-on: ubuntu-latest
2530
permissions: {}
2631
outputs:
2732
version: ${{ steps.pick.outputs.version }}
2833
steps:
34+
# Central sync isn't instantaneous after the publish job finishes, so a
35+
# run triggered right after a publish gives it a few minutes before
36+
# asking maven-metadata.xml for the "latest" release below.
37+
- name: Wait for Maven Central sync
38+
if: ${{ github.event_name == 'workflow_run' }}
39+
run: sleep 300
40+
2941
- name: Resolve version (input, else latest on Maven Central)
3042
id: pick
3143
shell: bash

0 commit comments

Comments
 (0)