cicd: show info about minimal required GLIBC version for CLI

This commit is contained in:
Andrew Hlynskyi 2023-05-19 15:57:40 +03:00
parent 3af763e4be
commit 1f42f1efc0

View file

@ -72,6 +72,8 @@ jobs:
env:
BUILD_CMD: cargo
EMSCRIPTEN_VERSION: ""
EXE: ${{ contains(matrix.target, 'windows') && '.exe' || '' }}
defaults:
run:
@ -159,6 +161,12 @@ jobs:
- name: Build CLI
run: $BUILD_CMD build --release --target=${{ matrix.target }}
- name: Info about CLI
if: ${{ startsWith(matrix.runtime, 'linux') }}
run: |
min_glibc=$(objdump -p target/$TARGET/release/tree-sitter${{ env.EXE }} | sed -nr 's/.*(GLIBC_.+).*/\1/p' | sort -uV | tail -n1)
echo "🔗 Minimal **glibc** version required for CLI: ${min_glibc}">> $GITHUB_STEP_SUMMARY
- name: Fetch fixtures
if: ${{ inputs.run-tests && !matrix.cli-only }} # Don't fetch fixtures for only CLI building targets
run: script/fetch-fixtures
@ -187,7 +195,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: tree-sitter.${{ matrix.runtime }}
path: target/${{ matrix.target }}/release/tree-sitter${{ contains(matrix.target, 'windows') && '.exe' || '' }}
path: target/${{ matrix.target }}/release/tree-sitter${{ env.EXE }}
if-no-files-found: error
retention-days: 7