Skip to content

Commit c290bf0

Browse files
committed
ci/github: add macOS build action
1 parent 7915b98 commit c290bf0

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/ccpp.yml

+40-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: C/C++ CI
33
on: [push]
44

55
jobs:
6-
build:
6+
build-ubuntu:
7+
name: Ubuntu/GCC build
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v3
@@ -27,3 +28,41 @@ jobs:
2728
run: make
2829
- name: make check
2930
run: make check
31+
32+
build-macos:
33+
name: macOS/Clang build
34+
runs-on: macos-11
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: deps
38+
run: |
39+
brew install msgpack-cxx asio gnutls nettle readline fmt jsoncpp argon2 openssl http-parser
40+
41+
- name: restinio
42+
run: |
43+
mkdir restinio && cd restinio
44+
wget https://github.com/aberaud/restinio/archive/e0a261dd8488246a3cb8bbb3ea781ea5139c3c94.tar.gz
45+
ls -l && tar -xzf e0a261dd8488246a3cb8bbb3ea781ea5139c3c94.tar.gz
46+
cd restinio-e0a261dd8488246a3cb8bbb3ea781ea5139c3c94/dev
47+
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DRESTINIO_TEST=OFF -DRESTINIO_SAMPLE=OFF \
48+
-DRESTINIO_INSTALL_SAMPLES=OFF -DRESTINIO_BENCH=OFF -DRESTINIO_INSTALL_BENCHES=OFF \
49+
-DRESTINIO_FIND_DEPS=ON -DRESTINIO_ALLOW_SOBJECTIZER=Off -DRESTINIO_USE_BOOST_ASIO=none .
50+
make -j8 && sudo make install
51+
cd ../../.. && rm -rf restinio
52+
53+
- name: cmake
54+
run: |
55+
mkdir build && cd build
56+
export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
57+
export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
58+
export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
59+
export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
60+
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug \
61+
-DOPENDHT_C=On -DOPENDHT_TESTS=On -DOPENDHT_PEER_DISCOVERY=On -DOPENDHT_PYTHON=Off \
62+
-DOPENDHT_TOOLS=On -DOPENDHT_PROXY_SERVER=On -DOPENDHT_PROXY_CLIENT=On
63+
64+
- name: make
65+
run: cd build && make
66+
67+
- name: make check
68+
run: cd build && make check

0 commit comments

Comments
 (0)