Skip to content

Commit e259bd0

Browse files
committed
Fix WASM build path and add debugging
- Fix the WASM copy path (we're in fix-python-soname dir when copying) - Split artifact upload for Linux vs non-Linux platforms - Add extensive debugging to understand WASM build process - Show current directory and build output - List WASM directory contents after build This should help us understand why the WASM file isn't being included in the artifact.
1 parent c59e77b commit e259bd0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/CI.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,15 @@ jobs:
150150
echo "Building fix-python-soname WASI module..."
151151
rustup target add wasm32-wasip1
152152
cd fix-python-soname
153+
echo "Current directory: $(pwd)"
154+
echo "Building WASM module..."
153155
cargo build --target wasm32-wasip1 --release
156+
echo "Build complete. Checking for WASM file..."
157+
ls -la target/wasm32-wasip1/release/ || echo "Release directory not found"
158+
# Copy WASM to root from fix-python-soname directory
159+
cp target/wasm32-wasip1/release/fix-python-soname.wasm .. || echo "Failed to copy WASM"
154160
cd ..
155-
# Copy WASM to root
156-
cp fix-python-soname/target/wasm32-wasip1/release/fix-python-soname.wasm . || echo "Failed to copy WASM"
161+
echo "Back in root directory: $(pwd)"
157162
ls -la fix-python-soname.wasm || echo "WASM file not found after copy"
158163
fi
159164
- name: Build
@@ -167,8 +172,9 @@ jobs:
167172
echo "Looking for WASM files:"
168173
find . -name "*.wasm" -type f
169174
if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
170-
- name: Upload artifact
175+
- name: Upload artifact (Linux with WASM)
171176
uses: actions/upload-artifact@v4
177+
if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
172178
with:
173179
name: bindings-${{ matrix.settings.target }}
174180
path: |
@@ -178,6 +184,16 @@ jobs:
178184
fix-python-soname.wasm
179185
fix-python-soname.js
180186
if-no-files-found: error
187+
- name: Upload artifact (non-Linux)
188+
uses: actions/upload-artifact@v4
189+
if: ${{ matrix.settings.target != 'x86_64-unknown-linux-gnu' }}
190+
with:
191+
name: bindings-${{ matrix.settings.target }}
192+
path: |
193+
${{ env.APP_NAME }}.*.node
194+
index.d.ts
195+
index.js
196+
if-no-files-found: error
181197

182198
test-macOS-windows-binding:
183199
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}

0 commit comments

Comments
 (0)