Skip to content

Commit 1f42f1e

Browse files
committed
cicd: show info about minimal required GLIBC version for CLI
1 parent 3af763e commit 1f42f1e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ jobs:
7272

7373
env:
7474
BUILD_CMD: cargo
75+
EMSCRIPTEN_VERSION: ""
76+
EXE: ${{ contains(matrix.target, 'windows') && '.exe' || '' }}
7577

7678
defaults:
7779
run:
@@ -159,6 +161,12 @@ jobs:
159161
- name: Build CLI
160162
run: $BUILD_CMD build --release --target=${{ matrix.target }}
161163

164+
- name: Info about CLI
165+
if: ${{ startsWith(matrix.runtime, 'linux') }}
166+
run: |
167+
min_glibc=$(objdump -p target/$TARGET/release/tree-sitter${{ env.EXE }} | sed -nr 's/.*(GLIBC_.+).*/\1/p' | sort -uV | tail -n1)
168+
echo "🔗 Minimal **glibc** version required for CLI: ${min_glibc}">> $GITHUB_STEP_SUMMARY
169+
162170
- name: Fetch fixtures
163171
if: ${{ inputs.run-tests && !matrix.cli-only }} # Don't fetch fixtures for only CLI building targets
164172
run: script/fetch-fixtures
@@ -187,7 +195,7 @@ jobs:
187195
uses: actions/upload-artifact@v3
188196
with:
189197
name: tree-sitter.${{ matrix.runtime }}
190-
path: target/${{ matrix.target }}/release/tree-sitter${{ contains(matrix.target, 'windows') && '.exe' || '' }}
198+
path: target/${{ matrix.target }}/release/tree-sitter${{ env.EXE }}
191199
if-no-files-found: error
192200
retention-days: 7
193201

0 commit comments

Comments
 (0)