-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.31 KB
/
tests.yml
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
name: Run tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install -y libsecp256k1-dev libsodium-dev python3 golang
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install secp256k1 libsodium python3 go
sudo mkdir -p /usr/local/{lib,include}
sudo chmod 755 /usr/local/{lib,include}
echo "LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH" >> $GITHUB_ENV
echo "CPATH=/opt/homebrew/include:$CPATH" >> $GITHUB_ENV
fi
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.uv/bin" >> $GITHUB_PATH
- name: Build
run: |
make
if [ "$RUNNER_OS" == "macOS" ]; then
sudo make INSTALL_PREFIX=/opt/homebrew install
else
sudo make install
fi
- name: Run Python tests
run: |
cd examples/py
make test fuzz
- name: Run Go tests
run: |
cd examples/go
if [ "$RUNNER_OS" != "macOS" ]; then
make test
fi