Skip to content

Commit 80c335d

Browse files
committed
code review fixes
1 parent 91567ef commit 80c335d

2 files changed

Lines changed: 99 additions & 75 deletions

File tree

.github/workflows/check-c-abi.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
steps:
3131
- name: Checkout main branch
3232
uses: actions/checkout@v4
33-
33+
3434
- name: Set up Python
3535
uses: actions/setup-python@v5
3636
with:
3737
python-version: '3.11'
38-
38+
3939
- name: Install system dependencies
4040
run: |
4141
sudo apt-get update
@@ -44,12 +44,12 @@ jobs:
4444
clang \
4545
cmake \
4646
ninja-build
47-
47+
4848
- name: Install Python dependencies
4949
run: |
5050
pip install --upgrade pip
5151
pip install msgspec libclang termcolor
52-
52+
5353
- name: Build C++ project to get dependencies (dlpack)
5454
run: |
5555
mkdir -p cpp/build
@@ -60,23 +60,23 @@ jobs:
6060
-DBUILD_TESTS=OFF \
6161
-DBUILD_EXAMPLES=OFF
6262
echo "Build directory created and dependencies fetched"
63-
63+
6464
- name: Extract ABI from main branch
6565
run: |
6666
mkdir -p baseline
6767
python ci/check_c_abi.py extract \
68-
--header_path c/include \
69-
--include_file cuvs/core/all.h \
70-
--output_file baseline/c_abi.json.gz
68+
--header-path c/include \
69+
--include-file cuvs/core/all.h \
70+
--output-file baseline/c_abi.json.gz
7171
echo "ABI extracted from main branch (commit: ${{ github.sha }})"
72-
72+
7373
- name: Store commit-specific baseline
7474
uses: actions/upload-artifact@v4
7575
with:
7676
name: c-abi-baseline-${{ github.sha }}
7777
path: baseline/c_abi.json.gz
7878
retention-days: 90 # Keep for 3 months
79-
79+
8080
- name: Store main baseline (latest, never expires)
8181
uses: actions/upload-artifact@v4
8282
with:
@@ -93,12 +93,12 @@ jobs:
9393
uses: actions/checkout@v4
9494
with:
9595
fetch-depth: 0
96-
96+
9797
- name: Set up Python
9898
uses: actions/setup-python@v5
9999
with:
100100
python-version: '3.11'
101-
101+
102102
- name: Install system dependencies
103103
run: |
104104
sudo apt-get update
@@ -107,12 +107,12 @@ jobs:
107107
clang \
108108
cmake \
109109
ninja-build
110-
110+
111111
- name: Install Python dependencies
112112
run: |
113113
pip install --upgrade pip
114114
pip install msgspec libclang termcolor
115-
115+
116116
- name: Build C++ project to get dependencies (dlpack)
117117
run: |
118118
mkdir -p cpp/build
@@ -123,15 +123,15 @@ jobs:
123123
-DBUILD_TESTS=OFF \
124124
-DBUILD_EXAMPLES=OFF
125125
echo "Build directory created and dependencies fetched"
126-
126+
127127
- name: Find merge base commit
128128
id: merge-base
129129
run: |
130130
git fetch origin main
131131
MERGE_BASE=$(git merge-base HEAD origin/main)
132132
echo "merge_base_sha=${MERGE_BASE}" >> $GITHUB_OUTPUT
133133
echo "Merge base commit: ${MERGE_BASE}"
134-
134+
135135
- name: Try to download baseline for merge-base commit (most accurate)
136136
id: download-merge-base
137137
continue-on-error: true
@@ -141,7 +141,7 @@ jobs:
141141
workflow: check-c-abi.yaml
142142
commit: ${{ steps.merge-base.outputs.merge_base_sha }}
143143
path: baseline/
144-
144+
145145
- name: Try to download latest main baseline (fallback 1)
146146
id: download-main
147147
if: steps.download-merge-base.outcome == 'failure'
@@ -152,7 +152,7 @@ jobs:
152152
workflow: check-c-abi.yaml
153153
branch: main
154154
path: baseline/
155-
155+
156156
- name: Extract baseline ABI from main branch (fallback 2)
157157
if: steps.download-merge-base.outcome == 'failure' && steps.download-main.outcome == 'failure'
158158
run: |
@@ -169,11 +169,11 @@ jobs:
169169
cd ../../..
170170
mkdir -p baseline
171171
python ci/check_c_abi.py extract \
172-
--header_path ../cuvs-main/c/include \
173-
--include_file cuvs/core/all.h \
174-
--output_file baseline/c_abi.json.gz
172+
--header-path ../cuvs-main/c/include \
173+
--include-file cuvs/core/all.h \
174+
--output-file baseline/c_abi.json.gz
175175
echo "✓ Baseline ABI extracted from main branch"
176-
176+
177177
- name: Report baseline source
178178
run: |
179179
if [ "${{ steps.download-merge-base.outcome }}" == "success" ]; then
@@ -183,14 +183,14 @@ jobs:
183183
else
184184
echo "✓ Using freshly extracted baseline from main branch"
185185
fi
186-
186+
187187
- name: Analyze current branch for ABI breaking changes
188188
run: |
189189
python ci/check_c_abi.py analyze \
190-
--abi_file baseline/c_abi.json.gz \
191-
--header_path c/include \
192-
--include_file cuvs/core/all.h
193-
190+
--abi-file baseline/c_abi.json.gz \
191+
--header-path c/include \
192+
--include-file cuvs/core/all.h
193+
194194
- name: Comment on PR with results
195195
if: failure() && github.event_name == 'pull_request'
196196
uses: actions/github-script@v7
@@ -201,10 +201,10 @@ jobs:
201201
owner: context.repo.owner,
202202
repo: context.repo.repo,
203203
body: `## ⚠️ C ABI Breaking Changes Detected
204-
204+
205205
This PR introduces breaking changes to the C ABI. Please review the changes carefully.
206206

207-
Breaking ABI changes are only allowed in major releases. If this is intentional for a major release,
207+
Breaking ABI changes are only allowed in major releases. If this is intentional for a major release,
208208
the baseline ABI will need to be updated after merge.
209209

210210
See the job logs for details on what specific changes were detected.

0 commit comments

Comments
 (0)