-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.45 KB
/
Copy pathsdk-api-compatibility.yml
File metadata and controls
71 lines (63 loc) · 2.45 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
name: SDK API compatibility
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
semver:
name: Reviewed SDK surface
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: 1.96.1
- name: Select the target-branch baseline
id: baseline
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE: ${{ github.event.before }}
run: |
if [ "$EVENT_NAME" = "pull_request" ]; then
revision="$PR_BASE"
else
revision="$PUSH_BEFORE"
fi
test -n "$revision"
test "$revision" != "0000000000000000000000000000000000000000"
git cat-file -e "$revision^{commit}"
echo "revision=$revision" >> "$GITHUB_OUTPUT"
# The default façade is intentionally tiny. It receives an independent
# check so enabling `execution` cannot hide a default-surface break.
- name: Check default SDK API compatibility
# Before the first published tag this is an API-drift report, not a
# compatibility promise. Make it blocking against the latest release
# tag when the first SDK contract is published.
continue-on-error: true
uses: obi1kenobi/cargo-semver-checks-action@6b69fcf40e9b5fb17adeb57e4b6ecd020649a239 # v2
with:
package: rsscript-sdk
manifest-path: crates/rsscript-sdk/Cargo.toml
feature-group: default-features
baseline-rev: ${{ steps.baseline.outputs.revision }}
rust-toolchain: manual
# `execution` is the reviewed embedding path. Compatibility and native
# JIT APIs intentionally remain outside this feature closure.
- name: Check execution SDK API compatibility
continue-on-error: true
uses: obi1kenobi/cargo-semver-checks-action@6b69fcf40e9b5fb17adeb57e4b6ecd020649a239 # v2
with:
package: rsscript-sdk
manifest-path: crates/rsscript-sdk/Cargo.toml
feature-group: only-explicit-features
features: execution
baseline-rev: ${{ steps.baseline.outputs.revision }}
rust-toolchain: manual