|
| 1 | +name: Coverity |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 0 * * *" |
| 6 | + |
| 7 | +jobs: |
| 8 | + scan: |
| 9 | + runs-on: ubuntu-18.04 |
| 10 | + if: ${{ github.repository_owner == 'openresty' }} |
| 11 | + env: |
| 12 | + COVERITY_SCAN_PROJECT_NAME: 'rds-json-nginx-module' |
| 13 | + COVERITY_SCAN_BRANCH_PATTERN: '*' |
| 14 | + COVERITY_SCAN_NOTIFICATION_EMAIL: 'chipitsine@gmail.com' |
| 15 | + LUAJIT_PREFIX: '/opt/luajit21' |
| 16 | + LUAJIT_LIB: '/opt/luajit21/lib' |
| 17 | + LUAJIT_INC: '/opt/luajit21/include/luajit-2.1' |
| 18 | + LUA_INCLUDE_DIR: '/opt/luajit21/include/luajit-2.1' |
| 19 | + LUA_CMODULE_DIR: '/lib' |
| 20 | + JOBS: 3 |
| 21 | + NGX_BUILD_JOBS: 3 |
| 22 | + NGINX_VERSION: 1.19.9 |
| 23 | + CC: gcc |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v3 |
| 26 | + - name: Install apt dependencies |
| 27 | + run: | |
| 28 | + sudo apt-get update |
| 29 | + sudo apt-get install -y axel libgd-dev |
| 30 | + - name: clone OpenResty satellites |
| 31 | + run: | |
| 32 | + git clone https://github.com/openresty/nginx-devel-utils.git |
| 33 | + git clone https://github.com/openresty/openresty.git ../openresty |
| 34 | + git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx |
| 35 | + git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module |
| 36 | + git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module |
| 37 | + git clone https://github.com/openresty/lua-resty-core.git ../lua-resty-core |
| 38 | + git clone https://github.com/openresty/lua-resty-lrucache.git ../lua-resty-lrucache |
| 39 | + git clone https://github.com/openresty/nginx-eval-module.git ../eval-nginx-module |
| 40 | + git clone https://github.com/openresty/xss-nginx-module.git ../xss-nginx-module |
| 41 | + git clone https://github.com/openresty/set-misc-nginx-module.git ../set-misc-nginx-module |
| 42 | + git clone https://github.com/openresty/headers-more-nginx-module.git ../headers-more-nginx-module |
| 43 | + git clone https://github.com/openresty/drizzle-nginx-module.git ../drizzle-nginx-module |
| 44 | + git clone https://github.com/calio/form-input-nginx-module.git ../form-input-nginx-module |
| 45 | + git clone https://github.com/openresty/ngx_postgres.git ../postgres-nginx-module |
| 46 | + git clone https://github.com/openresty/openresty.git ../ngx_openresty |
| 47 | + git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module |
| 48 | + git clone https://github.com/openresty/array-var-nginx-module.git ../array-var-nginx-module |
| 49 | + - name: Install libdrizzle |
| 50 | + run: | |
| 51 | + wget http://openresty.org/download/drizzle7-2011.07.21.tar.gz |
| 52 | + tar xzf drizzle7-2011.07.21.tar.gz && cd drizzle7-2011.07.21 |
| 53 | + ./configure --prefix=/usr --without-server |
| 54 | + sudo PATH=$PATH make libdrizzle-1.0 install-libdrizzle-1.0 |
| 55 | + - name: Install luajit2 |
| 56 | + run: | |
| 57 | + git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git |
| 58 | + cd luajit2 |
| 59 | + make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' |
| 60 | + sudo make install PREFIX=$LUAJIT_PREFIX |
| 61 | + - name: Run Coverity Scan |
| 62 | + env: |
| 63 | + COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
| 64 | + run: | |
| 65 | + export COVERITY_SCAN_BUILD_COMMAND="sh util/build.sh $NGINX_VERSION" |
| 66 | + export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH |
| 67 | + export NGX_BUILD_CC=gcc |
| 68 | + curl -fsSL "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true |
0 commit comments