-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (70 loc) · 2.22 KB
/
job-clang-analyzer.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
72
73
74
name: Clang analyzer
on:
workflow_call:
inputs:
cc:
required: true
type: string
ngx:
required: true
type: string
openresty:
required: true
type: string
runtime:
required: true
type: string
wasmtime:
required: true
type: string
wasmer:
required: true
type: string
v8:
required: true
type: string
ssl:
required: true
type: string
debug:
required: true
type: string
defaults:
run:
shell: bash
env:
CC: ${{ inputs.cc }}
NGX_IPC: 1
NGX_BUILD_OPENRESTY: ${{ inputs.openresty }}
NGX_BUILD_DEBUG: ${{ inputs.debug == 'debug' && 1 || 0 }}
NGX_BUILD_SSL: ${{ inputs.ssl == 'ssl' && 1 || 0 }}
NGX_BUILD_CLANG_ANALYZER: 1
jobs:
analyzer:
name: 'Clang analyzer'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- run: |
sudo apt-get update
sudo apt-get install -y $(echo ${{ inputs.cc }} | sed s/clang/clang-tools/)
sudo update-alternatives --install /usr/bin/scan-build scan-build /usr/bin/$(echo ${{ inputs.cc }} | sed s/clang/scan-build/) 100
- uses: actions/checkout@v4
- name: 'Setup cache - work/ dir'
uses: actions/cache@v4
if: ${{ !env.ACT }}
with:
path: |
work/downloads
work/runtimes
work/openssl
key: work-${{ runner.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.openresty }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain') }}
- name: Setup Wasm runtime
run: ./util/runtime.sh -R ${{ inputs.runtime }} -V ${{ inputs[inputs.runtime] }}
- run: make setup
- run: make
- uses: actions/upload-artifact@v4
if: ${{ failure() && !env.ACT }}
with:
name: ${{ github.job }}-sha-${{ github.sha }}-run-${{ github.run_number }}-${{ inputs.ngx != '' && format('nginx-{0}', inputs.ngx) || format('openresty-{0}', inputs.openresty) }}-${{ inputs.runtime }}-${{ inputs.ssl }}-${{ inputs.hup }}-${{ inputs.debug }}
path: work/scans/*