ci: install zstd binary

This commit is contained in:
MDLeom 2024-06-11 12:06:41 +00:00
parent 30c33c0ad3
commit a2c810cfb5
No known key found for this signature in database
GPG Key ID: 06C236E63CBC68AA
1 changed files with 13 additions and 4 deletions

View File

@ -23,11 +23,20 @@ jobs:
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Determine zstd binary version
shell: bash
run: |
npm install
npm install @mongodb-js/zstd-linux-x64-musl \
@mongodb-js/zstd-win32-x64-msvc \
@mongodb-js/zstd-darwin-arm64
case "$RUNNER_OS" in
"Linux")
echo "PLATFORM=linux-x64-gnu" >> "$GITHUB_ENV" ;;
"Windows")
echo "PLATFORM=win32-x64-msvc" >> "$GITHUB_ENV" ;;
"macOS")
echo "PLATFORM=darwin-arm64" >> "$GITHUB_ENV" ;;
esac
- name: Install zstd binary
run: npm install "@mongodb-js/zstd-${PLATFORM}"
- name: Test
run: npm run test
env: