From d5fa87c28de77efc6ee1132aef7ab415c7093c21 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Thu, 25 Apr 2024 19:16:26 +0200 Subject: [PATCH] ci: add basic darwin workflow --- .github/workflows/CI-darwin.yml | 21 +++++++++++++++++++++ deps/Makefile | 8 +++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/CI-darwin.yml diff --git a/.github/workflows/CI-darwin.yml b/.github/workflows/CI-darwin.yml new file mode 100644 index 0000000000..9fa9932ced --- /dev/null +++ b/.github/workflows/CI-darwin.yml @@ -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 diff --git a/deps/Makefile b/deps/Makefile index 24501d5331..ee0c726d4d 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -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 @@ -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 @@ -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 .