Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM CI #445

Merged
merged 83 commits into from
Aug 3, 2022
Merged

WASM CI #445

merged 83 commits into from
Aug 3, 2022

Conversation

nickpdemarco
Copy link
Member

@nickpdemarco nickpdemarco commented Jun 21, 2022

This PR adds CI support for Webassembly. It resolves #404, #405, and part of #406.

Note: 406 still requires unit tests for the WASM main_executor to be considered complete.

This introduces a CMake toolchain file, cmake/Platform/Emscripten-STLab.cmake which extends the Emscripten SDK's own toolchain, and enables some experimental features required by STLab tests to compile and run successfully. Those features are threading support and exception handling.

Following our existing convention, the tests may be executed simply with ctest from the build directory. A node runner is used.

Note that Node 16.16.0 or newer is required for sufficient exception handling support. The new CMake toolchain will report an error if this requirement is not satisfied. To use an appropriate version, we must edit a configuration file .emscripten in the emsdk directory to point to the system installation of node (16.16.0 is installed for GH Actions).

@nickpdemarco nickpdemarco changed the title Demarco/wasm ci WASM CI Jun 21, 2022
@nickpdemarco nickpdemarco marked this pull request as draft June 21, 2022 17:01
@nickpdemarco
Copy link
Member Author

What are we doing with multiprecision? Test cases?

Yes. There's just one - see executor_test.cpp, introduced with #306.

@@ -34,54 +34,98 @@ jobs:
- name: Install dependencies (macos)
if: ${{ startsWith(matrix.config.os, 'macos') }}
run: |
brew update
brew install boost
brew install ninja
shell: bash

- name: Install dependencies (ubuntu)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call this "Install dependencies (Linux GCC/Clang)" and the new one "Install dependencies (Linux Webassembly)"? I'm going off the names in the matrix file. It'd be good if we could figure out something consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I also mulled this over and I'm craving consistency. I'll take another crack at it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a crack at it, not satisfied but it crossed my 80/20 threshold. Let me know what you think.

https://github.com/stlab/libraries/runs/7640371961?check_suite_focus=true

.github/workflows/stlab.yml Outdated Show resolved Hide resolved
.github/workflows/stlab.yml Outdated Show resolved Hide resolved
.github/workflows/stlab.yml Outdated Show resolved Hide resolved
.github/workflows/stlab.yml Show resolved Hide resolved
cmake/ExperimentalEmscripten.cmake Outdated Show resolved Hide resolved
cmake/ExperimentalEmscripten.cmake Outdated Show resolved Hide resolved
cmake/ExperimentalEmscripten.cmake Outdated Show resolved Hide resolved
cmake/ExperimentalEmscripten.cmake Outdated Show resolved Hide resolved
stlab/concurrency/main_executor.hpp Show resolved Hide resolved
Copy link
Contributor

@camio camio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a white-glove review. This code is top quality. I'm approving, but there are a couple (minor) remaining issues.

  1. I made a handful of comment rewording and formatting suggestions.
  2. The top-level PR comment references cmake/ExperimentalEmscripten.cmake still. I didn't notice any other issues, but it'd probably be good for you to give it a once-over. I assume this PR title+comment is going to be the squash&merge commit message.

cmake/Platform/Emscripten-STLab.cmake Outdated Show resolved Hide resolved
cmake/Platform/Emscripten-STLab.cmake Outdated Show resolved Hide resolved
cmake/Platform/Emscripten-STLab.cmake Outdated Show resolved Hide resolved
cmake/Platform/Emscripten-STLab.cmake Show resolved Hide resolved
nickpdemarco and others added 2 commits August 2, 2022 19:46
Co-authored-by: David Sankel <dsankel@adobe.com>
Co-authored-by: David Sankel <dsankel@adobe.com>
@nickpdemarco nickpdemarco merged commit 79c8781 into main Aug 3, 2022
@nickpdemarco nickpdemarco deleted the demarco/wasm-ci branch August 3, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All tests compile and pass on WASM
3 participants