forked from Chia-Network/bls-signatures
-
Notifications
You must be signed in to change notification settings - Fork 15
82 lines (72 loc) · 2.19 KB
/
build-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build and Test C++, Javascript, and Python
on: [push, pull_request]
jobs:
build_wheels:
name: Build and Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-latest, ubuntu-20.04, ubuntu-latest]
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@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.8'
- name: Ubuntu build C++ and test with valgrind
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install valgrind -y
sudo apt-get install snap -y
sudo apt-get remove --purge cmake -y
sudo snap install cmake --classic
hash -r
cmake --version
echo "attempting to curl"
curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz | tar xz
echo "curl complete."
cd libsodium-stable
ls -l
./configure --with-pic="yes"
make
sudo make install
cd ..
echo "Setting libsodium to static compile."
export CIBUILDWHEEL=1
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