feat: thread-safe elements #343
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test C++, Javascript, and Python | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build and Test on ${{ matrix.os }} CPython ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
python: ['3.7', '3.8', '3.9'] | |
steps: | |
- name: Cancel previous runs on the same branch | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Ubuntu build C++ and test with valgrind | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qq --yes valgrind snap libgmp-dev libsodium-dev | |
sudo apt-get remove --purge cmake -y | |
sudo snap install cmake --classic | |
hash -r | |
cmake --version | |
mkdir -p build | |
cd build | |
cmake ../ | |
cmake --build . -- -j 6 | |
echo "Running ./src/runtest" | |
./src/runtest | |
valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ./src/runtest | |
- name: Mac OS build C++ and test | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
ls -l | |
export MACOSX_DEPLOYMENT_TARGET=10.14 | |
mkdir -p build | |
ls -l build | |
cd build | |
cmake ../ | |
cmake --build . -- -j 6 | |
echo "Running ./src/runtest" | |
./src/runtest | |
- name: Test pure python implementation | |
run: | | |
python python-impl/impl-test.py | |
- name: Install emsdk | |
uses: mymindstorm/setup-emsdk@v9 | |
- name: Test javascript bindings | |
run: | | |
emcc -v | |
sh emsdk_build.sh | |
sh js_test.sh | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "^1.17" | |
- name: Test go bindings | |
run: | | |
cd go-bindings | |
make |