Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,23 @@ jobs:
..\
}
emmake make -j ${{ env.ncpus }} check-cppinterop
cd .\unittests\CppInterOp\
Invoke-WebRequest -Uri "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/1411573/chrome-win.zip" -OutFile "$PWD\chrome-win.zip" -Verbose
Expand-Archive -Path "$PWD\chrome-win.zip" -DestinationPath "$PWD" -Force -Verbose
Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US" -OutFile "firefox-setup.exe" -Verbose
& "C:\Program Files\7-Zip\7z.exe" x "firefox-setup.exe"
$env:PATH="$PWD\core;$PWD\chrome-win;$env:PATH"
echo "PATH=$env:PATH"
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
echo "Running CppInterOpTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
echo "Running CppInterOpTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html
cd ..\..
emmake make -j ${{ env.ncpus }} install

- name: Build and Test/Install CppInterOp on Windows systems (static library)
Expand Down Expand Up @@ -899,6 +916,15 @@ jobs:
..\
}
emmake make -j ${{ env.ncpus }} check-cppinterop
cd .\unittests\CppInterOp\
echo "Running CppInterOpTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
echo "Running CppInterOpTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html

- name: Build xeus-cpp
if: ${{ runner.os != 'windows' }}
Expand Down
22 changes: 21 additions & 1 deletion Emscripten-build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release `
emmake make -j $(nproc --all) check-cppinterop
```

It is possible to run the Emscripten tests in a headless browser on Linux and osx (in future we plan to include instructions on how to run the tests in a browser on Windows too). To do this we will first move to the tests directory
It is possible to run the Emscripten tests in a headless browser. To do this we will first move to the tests directory


```bash
Expand Down Expand Up @@ -283,6 +283,26 @@ echo "Running DynamicLibraryManagerTests in Firefox"
emrun --browser="firefox" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
```

To do this on Windows x86 execute the following

```powershell
Invoke-WebRequest -Uri "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/1411573/chrome-win.zip" -OutFile "$PWD\chrome-win.zip" -Verbose
Expand-Archive -Path "$PWD\chrome-win.zip" -DestinationPath "$PWD" -Force -Verbose
Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US" -OutFile "firefox-setup.exe" -Verbose
& "C:\Program Files\7-Zip\7z.exe" x "firefox-setup.exe"
$env:PATH="$PWD\core;$PWD\chrome-win;$env:PATH"
echo "PATH=$env:PATH"
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
echo "Running CppInterOpTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
echo "Running CppInterOpTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html
```

Assuming it passes all test you can install by executing the following

```bash
Expand Down
20 changes: 19 additions & 1 deletion docs/Emscripten-build-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ To build and test your Emscripten build of CppInterOp on Windows execute the fol
..\
emmake make -j $(nproc --all) check-cppinterop
It is possible to run the Emscripten tests in a headless browser on Linux and osx (in future we plan to include instructions on how to run the tests in a browser on Windows too). To do this we will first move to the tests directory
It is possible to run the Emscripten tests in a headless browser. To do this we will first move to the tests directory

.. code:: bash
Expand Down Expand Up @@ -306,6 +306,24 @@ so we currently only run the tests using Firefox on this platform, unlike other
echo "Running DynamicLibraryManagerTests in Firefox"
emrun --browser="firefox" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
To do this on Windows x86 execute the following

.. code:: powershell
Invoke-WebRequest -Uri "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/1411573/chrome-win.zip" -OutFile "$PWD\chrome-win.zip" -Verbose
Expand-Archive -Path "$PWD\chrome-win.zip" -DestinationPath "$PWD" -Force -Verbose
Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US" -OutFile "firefox-setup.exe" -Verbose
& "C:\Program Files\7-Zip\7z.exe" x "firefox-setup.exe"
$env:PATH="$PWD\core;$PWD\chrome-win;$env:PATH"
echo "Running CppInterOpTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Firefox"
emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" DynamicLibraryManagerTests.html
echo "Running CppInterOpTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" CppInterOpTests.html
echo "Running DynamicLibraryManagerTests in Chromium"
emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html
Assuming it passes all test you can install by executing the following.

.. code:: bash
Expand Down
Loading