Skip to content
11 changes: 10 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ jobs:
name: Install dependencies
command: |
apt-get update
apt-get install -y libpcre3 libpcre3-dev zlib1g-dev libssl-dev build-essential wget
apt-get install -y libpcre3 libpcre3-dev zlib1g-dev libssl-dev build-essential wget git sudo
- run:
name: Install cmake
command: |
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
apt-get install -y cmake
- checkout

- run:
name: Build and test
command: |
Expand All @@ -27,3 +35,4 @@ workflows:
build:
jobs:
- build

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ prepare-travis-env:
wget --no-verbose https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -xzf nginx-${NGINX_VERSION}.tar.gz
ln -s nginx-${NGINX_VERSION} ${NGX_PATH}
cd ${NGX_PATH} && ./configure --with-http_ssl_module --with-cc=$(CC) --add-module=.
cd ${NGX_PATH} && ./configure --with-http_ssl_module --with-cc=$(CC) --add-module=/root/project

nginx:
cd ${NGX_PATH} && rm -rf ${NGX_PATH}/objs/src/core/nginx.o && make

vendor/cmocka:
git submodule init && git submodule update
cd /root/project && git submodule init && git submodule update

.cmocka_build: vendor/cmocka
mkdir .cmocka_build && cd .cmocka_build \
&& cmake -DCMAKE_C_COMPILER=$(CC) -DCMAKE_MAKE_PROGRAM=make ../vendor/cmocka \
.cmocka_build:
cd /root/project && git submodule init && git submodule update && mkdir .cmocka_build && cd .cmocka_build \
&& cmake -DCMAKE_C_COMPILER=$(CC) -DCMAKE_MAKE_PROGRAM=make /root/project/vendor/cmocka \
&& make && sudo make install

test: .cmocka_build | nginx
Expand Down