Skip to content

Commit

Permalink
ci: add basic darwin workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Apr 25, 2024
1 parent a7593ff commit d5fa87c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/CI-darwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Darwin

on:
push:

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: brew install automake bzip2 cmake git gpatch gnutls ossp-uuid grep libtool

- name: Build
run: |
export PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"
make
- name: Show version
run: ./src/proxysql --version
8 changes: 5 additions & 3 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ libssl/openssl/libssl.a:
# cd libssl/openssl && patch crypto/asn1/a_time.c < ../a_time.c-multiplication-overflow.patch
cd libssl/openssl && ./config no-ssl3 no-tests
cd libssl/openssl && CC=${CC} CXX=${CXX} ${MAKE}
cd libssl/openssl && ln -fsT . lib # curl wants this path
cd libssl/openssl && ln -fs . lib # curl wants this path

libssl: libssl/openssl/libssl.a

Expand All @@ -92,7 +92,9 @@ ifeq ($(UNAME_S),FreeBSD)
sed -i -e 's/\/bin\/bash/\/usr\/local\/bin\/bash/' libhttpserver/libhttpserver/bootstrap
endif
ifeq ($(SYS_KERN),Darwin)
sed -i -e 's/glibtoolize/libtoolize/' libhttpserver/libhttpserver/bootstrap
ifeq (, $(shell which glibtoolize))
sed -i -e 's/glibtoolize/libtoolize/' libhttpserver/libhttpserver/bootstrap
endif
endif
cd libhttpserver/libhttpserver && ./bootstrap && mkdir build
cd libhttpserver/libhttpserver/build && LDFLAGS=-L$(shell pwd)/libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/ CPPFLAGS=-I$(shell pwd)/libmicrohttpd/libmicrohttpd/src/include ../configure --disable-doxygen-doc --disable-doxygen-dot --disable-doxygen-man --disable-doxygen-html --enable-fastopen=false --disable-examples
Expand Down Expand Up @@ -159,7 +161,7 @@ lz4: lz4/lz4/lib/liblz4.a

clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib-static.a:
cd clickhouse-cpp && rm -rf clickhouse-cpp-*/ || true
cd clickhouse-cpp && ln -fsT clickhouse-cpp-2.3.0 clickhouse-cpp
cd clickhouse-cpp && ln -fs clickhouse-cpp-2.3.0 clickhouse-cpp
cd clickhouse-cpp && tar -zxf v2.3.0.tar.gz && sync
cd clickhouse-cpp/clickhouse-cpp && patch clickhouse/base/wire_format.h < ../wire_format.patch
cd clickhouse-cpp/clickhouse-cpp && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
Expand Down

0 comments on commit d5fa87c

Please sign in to comment.