forked from vmware-archive/ModSecurity-envoy
-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (67 loc) · 1.98 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: |
C:/Program Files/LLVM
./llvm
key: llvm-11.0
- name: ModSecurity Cache
id: cache-modsec
uses: actions/cache@v2
with:
path: ./modsec-src
key: modsec-v3
- name: Bazel cache
uses: actions/cache@v2
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Install deps
shell: bash
run: |
sudo apt-get update --error-on=any
sudo apt-get install --yes libtool cmake automake autoconf make ninja-build curl unzip virtualenv openjdk-11-jdk build-essential libc++1 \
pkg-config flex bison libcurl4-gnutls-dev libfuzzy-dev libgeoip-dev liblua5.3-dev libmaxminddb-dev libpcre3-dev libxml2-dev libyajl-dev
- name: Setup bazel
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: "4.1.0"
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Build ModSecurity
if: steps.cache-modsec.outputs.cache-hit != 'true'
run: |
git clone --recursive https://github.com/SpiderLabs/ModSecurity.git -b v3/master modsec-src
cd modsec-src
./build.sh
./configure
make
cd ..
- name: Install ModSecurity
run: |
cd modsec-src
sudo make install
cd ..
- name: Build envoy
run: |
./build.sh set-clang ${{ env.LLVM_PATH }}
./build.sh release --config=clang --define tcmalloc=gperftools
zip binaries.zip bazel-bin/envoy bazel-bin/envoy.stripped
- uses: actions/upload-artifact@v2
with:
name: envoy-binary
path: binaries.zip