-
Notifications
You must be signed in to change notification settings - Fork 17
50 lines (39 loc) · 1.42 KB
/
ci.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
op_version:
- "1.25.3.1"
runs-on: "ubuntu-20.04"
env:
OPENRESTY_VERSION: ${{ matrix.op_version }}
OPENRESTY_PREFIX: "/usr/local/openresty"
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
- name: Get dependencies
run: |
sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl luarocks libpcre3 libpcre3-dev zlib1g-dev
sudo luarocks install lua-resty-http > build.log 2>&1 || (cat build.log && exit 1)
- name: Before install
run: |
sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
git clone https://github.com/openresty/test-nginx.git test-nginx
- name: Install
run: |
wget https://raw.githubusercontent.com/zll600/apisix-build-tools/upgrade_openresty-1.25.3.1/build-apisix-base.sh
chmod +x build-apisix-base.sh
OR_PREFIX=$OPENRESTY_PREFIX CC="clang -fsanitize=address -fcolor-diagnostics -Qunused-arguments" \
cc_opt="-Werror" ./build-apisix-base.sh latest
- name: Script
run: |
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
prove -I. -Itest-nginx/lib -r t/