diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci-dev-distro-compiler.yaml | 14 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 31 | ||||
-rw-r--r-- | .github/workflows/clang-ast.yaml | 76 |
3 files changed, 100 insertions, 21 deletions
diff --git a/.github/workflows/ci-dev-distro-compiler.yaml b/.github/workflows/ci-dev-distro-compiler.yaml index 8b7f53b7..838b4243 100644 --- a/.github/workflows/ci-dev-distro-compiler.yaml +++ b/.github/workflows/ci-dev-distro-compiler.yaml @@ -39,7 +39,8 @@ jobs: which wget git gcc make pcre2-devel openssl-devel \ python-unversioned-command python3 python3-devel \ php-devel php-embedded perl-devel perl-ExtUtils-Embed \ - ruby-devel java-devel nodejs-devel nodejs-npm golang + ruby-devel java-devel nodejs-devel nodejs-npm golang \ + cargo rust if [ "${{ matrix.compiler }}" = "clang" ]; then dnf -y install --setopt=install_weak_deps=False clang fi @@ -50,9 +51,9 @@ jobs: - name: configure unit CC=${{ matrix.compiler }} run: | if [ "${{ matrix.compiler }}" = "clang" ]; then - ./configure --openssl --cc=clang + ./configure --openssl --otel --cc=clang else - ./configure --openssl + ./configure --openssl --otel fi - name: make unit @@ -128,7 +129,8 @@ jobs: run: | apk update && apk upgrade apk add gcc make musl-dev openssl-dev pcre2-dev curl \ - php83-dev php83-embed python3-dev perl-dev ruby-dev openjdk21-jdk + php83-dev php83-embed python3-dev perl-dev ruby-dev \ + openjdk21-jdk cargo rust if [ "${{ matrix.compiler }}" = "clang" ]; then apk add clang fi @@ -138,9 +140,9 @@ jobs: - name: configure unit CC=${{ matrix.compiler }} run: | if [ "${{ matrix.compiler }}" = "clang" ]; then - ./configure --openssl --cc=clang + ./configure --openssl --otel --cc=clang else - ./configure --openssl + ./configure --openssl --otel fi - name: make unit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f9bc699..03209406 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,6 @@ jobs: os: ubuntu-latest - build: perl os: ubuntu-latest - - build: php-8.1 - os: ubuntu-latest - build: php-8.2 os: ubuntu-latest - build: php-8.3 @@ -101,12 +99,18 @@ jobs: # https://github.com/actions/runner-images/issues/2821 - name: Kill mono process run: | - sudo systemctl stop mono-xsp4.service - sudo systemctl mask mono-xsp4.service - sudo systemctl status mono-xsp4.service || true - PID=$(sudo lsof -t -i :8084) - echo "Killing PID $PID" - sudo kill -9 $PID + set +e + sudo systemctl status mono-xsp4.service + if [ $? -ne 0 ]; then + true + else + sudo systemctl stop mono-xsp4.service + sudo systemctl mask mono-xsp4.service + sudo systemctl status mono-xsp4.service + PID=$(sudo lsof -t -i :8084) + echo "Killing PID $PID" + sudo kill -9 $PID + fi ## ## njs @@ -354,18 +358,15 @@ jobs: - name: Install pytest run: | - if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then - pip install pytest - else - sudo -H pip install pytest - fi + sudo apt install -y python3-pytest + if: steps.metadata.outputs.module != 'wasm' - name: Run ${{ steps.metadata.outputs.module }} tests run: | if [ "${{ matrix.build }}" == "wasm-wasi-component" ]; then - pytest --print-log ${{ steps.metadata.outputs.testpath }} + pytest-3 --print-log ${{ steps.metadata.outputs.testpath }} else - sudo -E pytest --print-log ${{ steps.metadata.outputs.testpath }} + sudo -E pytest-3 --print-log ${{ steps.metadata.outputs.testpath }} fi if: steps.metadata.outputs.module != 'wasm' diff --git a/.github/workflows/clang-ast.yaml b/.github/workflows/clang-ast.yaml new file mode 100644 index 00000000..7e032e9c --- /dev/null +++ b/.github/workflows/clang-ast.yaml @@ -0,0 +1,76 @@ +name: "Clang AST" + +on: + push: + branches: master + paths: + - configure + - 'auto/**' + - 'src/**' + - 'test/**' + - '.github/workflows/clang-ast.yaml' + pull_request: + branches: master + paths: + - configure + - 'auto/**' + - 'src/**' + - 'test/**' + - '.github/workflows/clang-ast.yaml' + +jobs: + clang-ast: + runs-on: ubuntu-latest + + container: + image: debian:testing + + steps: + - name: Install tools/deps + run: | + apt-get -y update + apt-get -y install git wget curl llvm-dev libclang-dev clang make \ + libssl-dev libpcre2-dev libperl-dev \ + libphp-embed php-dev python3-dev libpython3-dev \ + ruby-dev openjdk-17-jdk npm + npm install -g node-gyp + + - uses: actions/checkout@v4 + + - name: Checkout and build clang-ast + run: | + git clone https://github.com/nginx/clang-ast.git -b unit + cd clang-ast + make + + - name: Configure Unit + run: ./configure --cc=clang --cc-opt="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -add-plugin -Xclang ngx-ast" --openssl --debug --tests + + - name: Build Unit + run: make -j4 unitd + + - name: Build C tests + run: make -j4 tests + + - name: Build Perl language module + run: ./configure perl && make -j4 perl + + - name: Build PHP language module + run: ./configure php && make -j4 php + + - name: Build Python language module + run: ./configure python --config=python3-config && make -j4 python3 + + - name: Build Ruby language module + run: ./configure ruby && make -j4 ruby + + - name: Build Java support + run: ./configure java && make -j4 java + + - name: Build Nodejs support + run: ./configure nodejs && make node-local-install DESTDIR=node + + - name: Build wasm language module + run: | + 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 - + ./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 |