linux.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: Linux
  2. on:
  3. push:
  4. branches: ["master"]
  5. tags: ["4.*"]
  6. pull_request:
  7. branches: ["master"]
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. jobs:
  12. build:
  13. name: build + test
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. os:
  18. - amazonlinux:2023
  19. - ubuntu:20.04
  20. - ubuntu:22.04
  21. - ubuntu:24.04
  22. runs-on: ubuntu-latest
  23. container:
  24. image: ${{ matrix.os }}
  25. volumes:
  26. - ${{ contains('amazonlinux:2 ubuntu:16.04 ubuntu:18.04', matrix.os) && '/node20217:/node20217:rw,rshared' || ' ' }}
  27. - ${{ contains('amazonlinux:2 ubuntu:16.04 ubuntu:18.04', matrix.os) && '/node20217:/__e/node20:ro,rshared' || ' ' }}
  28. steps:
  29. - name: Install `yum` dependencies
  30. run: yum install -y gcc make gzip tar openssl-devel libevent-devel wget which
  31. if: ${{ contains(matrix.os, 'amazonlinux') }}
  32. - name: Install Node.js 20 built against glibc 2.17 for GitHub Actions
  33. run: |
  34. set -ex
  35. which apt \
  36. && apt update \
  37. && apt install -y wget xz-utils
  38. which yum \
  39. && yum install -y wget xz
  40. wget https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
  41. tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
  42. ldd /__e/node20/bin/node
  43. working-directory: /tmp/
  44. if: ${{ contains('amazonlinux:2 ubuntu:16.04 ubuntu:18.04', matrix.os) }}
  45. - uses: actions/checkout@v6
  46. - name: Install `apt` dependencies
  47. # Set env variable or otherwise `tzdata` package requires interaction.
  48. env:
  49. DEBIAN_FRONTEND: noninteractive
  50. uses: ./.github/workflows/actions/ubuntu-build-deps
  51. if: ${{ contains(matrix.os, 'ubuntu') }}
  52. - run: ./configure
  53. - run: make
  54. - run: make check
  55. - run: ./run_tests.sh
  56. working-directory: examples/
  57. - run: ./run_tests_conf.sh
  58. working-directory: examples/
  59. - run: ./run_tests_prom.sh
  60. working-directory: examples/
  61. if: ${{ contains(matrix.os, 'ubuntu') }}