diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 636e0ff1e7..83aeb9f1a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,3 +45,22 @@ jobs: pushd build ninja -v check-ia2 popd + build-nginx: + runs-on: self-hosted + steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Build nginx + run: | + LLVM_DIR=`llvm-config --cmakedir` + Clang_DIR=`realpath $LLVM_DIR/../clang` + pushd external/nginx + IA2_CMAKE_FLAGS=" + -DCMAKE_BUILD_TYPE=Release + -DClang_DIR=$Clang_DIR + -DLLVM_DIR=$LLVM_DIR" \ + ./reconfigure + pushd build/nginx + make + popd + popd diff --git a/external/nginx/reconfigure b/external/nginx/reconfigure index 76a2ca6555..e3c113fedc 100755 --- a/external/nginx/reconfigure +++ b/external/nginx/reconfigure @@ -28,7 +28,7 @@ fi if [ ! -f $SRC_REWRITER ] || [ ! -f $LIBIA2 ]; then mkdir -p $IA2_BUILD_DIR pushd $IA2_BUILD_DIR - cmake -GNinja $REPO_ROOT + cmake -GNinja $REPO_ROOT ${IA2_CMAKE_FLAGS:-} ninja ia2-rewriter libia2 pad-tls popd fi @@ -56,6 +56,7 @@ fi if [ ! -f $NGINX_ROOT/compile_commands.json ]; then bear -- make -j8 IA2_LDFLAGS= IA2_MODULE_LDFLAGS= IA2_CALLGATES= IA2_EXTRA_CFLAGS= IA2_ENABLE=0 build + cp compile_commands.json $BUILD_DIR/ fi if [ ! -f $BUILD_DIR/wrapper.c ] ||