You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Deps-packages
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y cmake libpcre2-dev libxxhash-dev
- name: Determine baseline
id: baseline
shell: bash
run: |
# Try to find latest baseline file
if [ -f .abi-baselines/latest.json ]; then
echo "Using existing baseline: .abi-baselines/latest.json"
echo "baseline_exists=true" >> "$GITHUB_OUTPUT"
else
echo "No baseline found, will build previous tag"
echo "baseline_exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Prepare old snapshot (baseline)
if: steps.baseline.outputs.baseline_exists == 'true'
shell: bash
run: |
cp .abi-baselines/latest.json old.json
echo "Copied baseline to old.json"
- name: Build old revision (if no baseline)
if: steps.baseline.outputs.baseline_exists == 'false'
shell: bash
run: |
# Determine previous tag or fallback
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -n "$LATEST_TAG" ]; then
BASE_SHA="$LATEST_TAG"
echo "Building old revision from tag: $BASE_SHA"
else
BASE_SHA="HEAD~1"
echo "No tags found, building from: $BASE_SHA"
fi
git worktree add /tmp/libyang-base "$BASE_SHA"
cmake -S /tmp/libyang-base -B /tmp/build-old -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF
cmake --build /tmp/build-old -j2
- name: Dump old snapshot (if built)
if: steps.baseline.outputs.baseline_exists == 'false'
uses: napetrov/abicheck@v0.2.0
with:
mode: dump
library: /tmp/build-old/libyang.so
header: /tmp/libyang-base/src/libyang.h
include: /tmp/libyang-base/src /tmp/build-old/libyang
lang: c
output-file: old.json
- name: Build current revision
shell: bash
run: |
cmake -S . -B /tmp/build-new -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF
cmake --build /tmp/build-new -j2
- name: Dump current snapshot
uses: napetrov/abicheck@v0.2.0
with:
mode: dump
library: /tmp/build-new/libyang.so
header: src/libyang.h
include: src /tmp/build-new/libyang
lang: c
output-file: new.json
- name: Compare snapshots (using abicheck CLI)
id: compare
shell: bash
run: |
# abicheck is installed via the action
abicheck compare old.json new.json \
--format json \
--output abicheck-report.json \
--fail-on-breaking \
--fail-on-api-break
# Exit code handling is done by abicheck itself
- name: Upload report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: abicheck-report
path: abicheck-report.json
Next steps
After merging the PR, the baseline workflow activates on new tags.
Regular CI will start checking all PRs with changes in include/src.
If needed, a manual trigger can be added to update the baseline on any branch.
(English translation of the previous comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the abicheck integration from CI pipeline job to a manual demo workflow.
What changed
abicheck-rfcjob from.github/workflows/ci.yml(no pipeline impact).github/workflows/abicheck-demo.ymlworkflow_dispatchonly (manual run)fail-on-breaking=false,fail-on-api-break=false)napetrov/abicheck@v0.2.0Goal
Pure demonstration scan path for maintainer evaluation, without changing normal CI behavior.
Ref: #2499 (comment)