Skip to content

Commit 9df17fe

Browse files
fix: install platform packages locally before running tests in CI
1 parent b6ca591 commit 9df17fe

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/CI.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,32 @@ jobs:
136136

137137
- name: Install dependencies
138138
run: npm install
139+
140+
- name: Setup platform packages
141+
run: |
142+
# Based on the target, determine which platform package we need
143+
PLATFORM=""
144+
if [[ "${{ matrix.target }}" == "aarch64-apple-darwin" ]]; then
145+
PLATFORM="darwin-arm64"
146+
elif [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
147+
PLATFORM="darwin-x64"
148+
elif [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
149+
PLATFORM="linux-x64-gnu"
150+
elif [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
151+
PLATFORM="linux-arm64-gnu"
152+
elif [[ "${{ matrix.target }}" == "x86_64-pc-windows-msvc" ]]; then
153+
PLATFORM="win32-x64-msvc"
154+
fi
155+
156+
# Install the platform package locally to make it available for tests
157+
if [ -d "libs/$PLATFORM" ]; then
158+
echo "Installing platform package: libs/$PLATFORM"
159+
npm install --no-save "file:libs/$PLATFORM"
160+
else
161+
echo "Platform directory libs/$PLATFORM not found"
162+
ls -la libs
163+
fi
164+
shell: bash
139165

140166
- name: Test
141167
run: npm test

0 commit comments

Comments
 (0)