Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,23 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "$TAG" "$ASSET" "$ASSET.sha256" --clobber

abi-manifest:
name: bddkit-plugin.json
needs: release
if: ${{ always() && (inputs.rebuild_tag != '' || needs.release.outputs.created == 'true') }}
runs-on: ubuntu-latest
permissions:
contents: write
env:
TAG: ${{ inputs.rebuild_tag != '' && inputs.rebuild_tag || needs.release.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ env.TAG }}

# Once per release, not from the per-target jobs, so they cannot race.
- name: Upload bddkit-plugin.json
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "$TAG" bddkit-plugin.json --clobber
1 change: 1 addition & 0 deletions bddkit-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi": 2}
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,17 @@ pub extern "C" fn bddkit_drop_instance(handle: u64) -> *mut c_char {

#[cfg(test)]
mod tests {
#[test]
fn bddkit_plugin_json_declares_the_abi_the_library_reports() {
let declared: serde_json::Value =
serde_json::from_str(include_str!("../bddkit-plugin.json")).expect("valid JSON");
assert_eq!(
declared["abi"],
crate::bddkit_abi_version(),
"bddkit-plugin.json must name the ABI bddkit_abi_version() returns"
);
}

#[test]
fn the_manifest_claims_the_browser_group_and_is_per_worker() {
let v: serde_json::Value = serde_json::from_str(&crate::manifest_json()).expect("JSON");
Expand Down
Loading