Skip to content

Commit bf7411c

Browse files
committed
add ci
1 parent 4d619fc commit bf7411c

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build-and-test:
13+
name: Build and Test
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Install dependencies (Ubuntu)
25+
if: runner.os == 'Linux'
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
libssl-dev \
30+
libsecp256k1-dev \
31+
libaes-siv-dev \
32+
autoconf \
33+
automake \
34+
libtool \
35+
pkg-config \
36+
autoconf-archive
37+
38+
- name: Install dependencies (macOS)
39+
if: runner.os == 'macOS'
40+
run: |
41+
brew install \
42+
openssl \
43+
libsecp256k1 \
44+
libaes-siv \
45+
autoconf \
46+
automake \
47+
libtool \
48+
pkg-config \
49+
autoconf-archive
50+
51+
- name: Generate build system
52+
run: ./autogen.sh
53+
54+
- name: Configure (Ubuntu)
55+
if: runner.os == 'Linux'
56+
run: ./configure
57+
58+
- name: Configure (macOS)
59+
if: runner.os == 'macOS'
60+
run: |
61+
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"
62+
./configure CFLAGS="-I/usr/local/opt/openssl/include" \
63+
LDFLAGS="-L/usr/local/opt/openssl/lib"
64+
65+
- name: Build
66+
run: make
67+
68+
- name: Run tests
69+
run: make check

0 commit comments

Comments
 (0)