|
| 1 | +name: "Clang AST" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: master |
| 6 | + paths: |
| 7 | + - configure |
| 8 | + - 'auto/**' |
| 9 | + - 'src/**' |
| 10 | + - 'test/**' |
| 11 | + - '.github/workflows/clang-ast.yaml' |
| 12 | + pull_request: |
| 13 | + branches: master |
| 14 | + paths: |
| 15 | + - configure |
| 16 | + - 'auto/**' |
| 17 | + - 'src/**' |
| 18 | + - 'test/**' |
| 19 | + - '.github/workflows/clang-ast.yaml' |
| 20 | + |
| 21 | +jobs: |
| 22 | + clang-ast: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + |
| 25 | + container: |
| 26 | + image: debian:testing |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Install tools/deps |
| 30 | + run: | |
| 31 | + apt-get -y update |
| 32 | + apt-get -y install git wget curl llvm-dev libclang-dev clang make \ |
| 33 | + libssl-dev libpcre2-dev libperl-dev \ |
| 34 | + libphp-embed php-dev python3-dev libpython3-dev \ |
| 35 | + ruby-dev openjdk-17-jdk npm |
| 36 | + npm install -g node-gyp |
| 37 | +
|
| 38 | + - uses: actions/checkout@v4 |
| 39 | + |
| 40 | + - name: Checkout and build clang-ast |
| 41 | + run: | |
| 42 | + git clone https://github.com/nginx/clang-ast.git -b unit |
| 43 | + cd clang-ast |
| 44 | + make |
| 45 | +
|
| 46 | + - name: Configure Unit |
| 47 | + run: ./configure --cc=clang --cc-opt="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -add-plugin -Xclang ngx-ast" --openssl --debug --tests |
| 48 | + |
| 49 | + - name: Build Unit |
| 50 | + run: make -j4 unitd |
| 51 | + |
| 52 | + - name: Build C tests |
| 53 | + run: make -j4 tests |
| 54 | + |
| 55 | + - name: Build Perl language module |
| 56 | + run: ./configure perl && make -j4 perl |
| 57 | + |
| 58 | + - name: Build PHP language module |
| 59 | + run: ./configure php && make -j4 php |
| 60 | + |
| 61 | + - name: Build Python language module |
| 62 | + run: ./configure python --config=python3-config && make -j4 python3 |
| 63 | + |
| 64 | + - name: Build Ruby language module |
| 65 | + run: ./configure ruby && make -j4 ruby |
| 66 | + |
| 67 | + - name: Build Java support |
| 68 | + run: ./configure java && make -j4 java |
| 69 | + |
| 70 | + - name: Build Nodejs support |
| 71 | + run: ./configure nodejs && make node-local-install DESTDIR=node |
| 72 | + |
| 73 | + - name: Build wasm language module |
| 74 | + run: | |
| 75 | + wget -q -O- https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.0/wasmtime-v26.0.0-x86_64-linux-c-api.tar.xz | tar -xJf - |
| 76 | + ./configure wasm --include-path=wasmtime-v26.0.0-x86_64-linux-c-api/include --lib-path=wasmtime-v26.0.0-x86_64-linux-c-api/lib --rpath && make wasm |
0 commit comments