test_offline.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: test_offline
  2. on:
  3. push:
  4. pull_request:
  5. workflow_dispatch:
  6. inputs:
  7. test_linux:
  8. description: 'Test on Linux'
  9. type: boolean
  10. default: true
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
  13. cancel-in-progress: true
  14. env:
  15. GTEST_FILTER: "-*.*_Online"
  16. jobs:
  17. ubuntu:
  18. runs-on: ubuntu-latest
  19. if: >
  20. (github.event_name == 'push') ||
  21. (github.event_name == 'pull_request' &&
  22. github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
  23. (github.event_name == 'workflow_dispatch' && github.event.inputs.test_linux == 'true')
  24. strategy:
  25. matrix:
  26. tls_backend: [openssl, no-tls]
  27. name: ubuntu (${{ matrix.tls_backend }})
  28. steps:
  29. - name: checkout
  30. uses: actions/checkout@v4
  31. - name: install common libraries
  32. run: |
  33. sudo apt-get update
  34. sudo apt-get install -y libcurl4-openssl-dev zlib1g-dev libbrotli-dev libzstd-dev
  35. - name: install OpenSSL
  36. if: matrix.tls_backend == 'openssl'
  37. run: sudo apt-get install -y libssl-dev
  38. - name: disable network
  39. run: sudo sh -c 'echo > /etc/resolv.conf'
  40. - name: build and run tests (OpenSSL)
  41. if: matrix.tls_backend == 'openssl'
  42. run: cd test && make
  43. env:
  44. LSAN_OPTIONS: suppressions=lsan_suppressions.txt
  45. - name: build and run tests (No TLS)
  46. if: matrix.tls_backend == 'no-tls'
  47. run: cd test && make test_no_tls && ./test_no_tls