Skip to content

Commit

Permalink
debug multi-threaded GH actions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgelfond committed Dec 24, 2024
1 parent b237a87 commit 58fccc8
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,39 @@ jobs:
-a no-sandbox \
-f http://localhost:3000/tests/ffmpeg-st.test.html 2>&1 | tee st-test.log
# Run multi-threaded tests with additional SharedArrayBuffer flags
# Run multi-threaded tests
echo "Running multi-threaded tests..."
CHROME_FLAGS="$CHROME_FLAGS --enable-features=SharedArrayBuffer,CrossOriginIsolation --cross-origin-isolated"
# Debug SharedArrayBuffer availability
echo "Testing SharedArrayBuffer availability..."
cat << EOF > debug-sab.js
console.log('SharedArrayBuffer available:', typeof SharedArrayBuffer !== 'undefined');
console.log('crossOriginIsolated:', window.crossOriginIsolated);
# Create a test script to verify browser environment
cat << EOF > verify-browser.html
<!DOCTYPE html>
<html>
<head>
<title>Browser Environment Test</title>
</head>
<body>
<script>
console.log('SharedArrayBuffer available:', typeof SharedArrayBuffer !== 'undefined');
console.log('crossOriginIsolated:', window.crossOriginIsolated);
</script>
</body>
</html>
EOF
node debug-sab.js
# Run the verification in Chrome
echo "Verifying browser environment..."
npx mocha-headless-chrome \
--args="$CHROME_FLAGS" \
--args="$CHROME_FLAGS --enable-features=SharedArrayBuffer,CrossOriginIsolation" \
-a no-sandbox \
-f http://localhost:3000/verify-browser.html
# Run MT tests with verified configuration
npx mocha-headless-chrome \
--args="$CHROME_FLAGS --enable-features=SharedArrayBuffer,CrossOriginIsolation" \
-a no-sandbox \
-f http://localhost:3000/tests/ffmpeg-core-mt.test.html 2>&1 | tee mt-core-test.log
npx mocha-headless-chrome \
--args="$CHROME_FLAGS" \
--args="$CHROME_FLAGS --enable-features=SharedArrayBuffer,CrossOriginIsolation" \
-a no-sandbox \
-f http://localhost:3000/tests/ffmpeg-mt.test.html 2>&1 | tee mt-test.log
Expand Down

0 comments on commit 58fccc8

Please sign in to comment.