1
0

test_offline.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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: |
  40. sudo iptables -A OUTPUT -o lo -j ACCEPT
  41. sudo iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  42. sudo iptables -A OUTPUT -j REJECT
  43. sudo ip6tables -A OUTPUT -o lo -j ACCEPT
  44. sudo ip6tables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  45. sudo ip6tables -A OUTPUT -j REJECT
  46. - name: build and run tests (OpenSSL)
  47. if: matrix.tls_backend == 'openssl'
  48. run: cd test && make test_split && make test_openssl_parallel
  49. env:
  50. LSAN_OPTIONS: suppressions=lsan_suppressions.txt
  51. - name: build and run tests (No TLS)
  52. if: matrix.tls_backend == 'no-tls'
  53. run: cd test && make test_no_tls_parallel
  54. - name: restore network
  55. if: always()
  56. run: |
  57. sudo iptables -F OUTPUT
  58. sudo ip6tables -F OUTPUT