CI.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. name: CI
  2. on:
  3. push:
  4. paths-ignore:
  5. - '**.md'
  6. pull_request:
  7. paths-ignore:
  8. - '**.md'
  9. jobs:
  10. build-linux:
  11. name: build-linux
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v3
  15. - name: build
  16. run: |
  17. sudo apt update
  18. sudo apt install libssl-dev libnghttp2-dev
  19. ./configure --with-openssl --with-nghttp2 --with-kcp --with-mqtt
  20. make libhv evpp
  21. - name: test
  22. run: |
  23. make check
  24. make run-unittest
  25. build-windows:
  26. name: build-windows
  27. runs-on: windows-latest
  28. steps:
  29. - uses: actions/checkout@v3
  30. - name: build
  31. run: |
  32. mkdir cmake-build-win64
  33. cd cmake-build-win64
  34. cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release
  35. cmake --build . --config Release
  36. cd ..
  37. - name: test
  38. run: |
  39. cd cmake-build-win64
  40. start bin/Release/http_server_test
  41. bin/Release/http_client_test
  42. bin/Release/curl -v -X HEAD http://example.com/
  43. bin/Release/curl -v -X HEAD https://example.com/
  44. bin/Release/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/ping
  45. build-mac:
  46. name: build-mac
  47. runs-on: macos-latest
  48. steps:
  49. - uses: actions/checkout@v3
  50. - name: build
  51. run: |
  52. ./configure
  53. make libhv evpp examples unittest
  54. - name: test
  55. run: |
  56. bin/curl -v -X HEAD http://example.com/
  57. bin/curl -v -X HEAD https://example.com/
  58. build-android:
  59. name: build-android
  60. runs-on: ubuntu-latest
  61. steps:
  62. - uses: actions/checkout@v3
  63. - name: build
  64. run: |
  65. mkdir cmake-build-arm64
  66. cd cmake-build-arm64
  67. cmake .. -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21
  68. cmake --build . --target hv --config Release
  69. build-ios:
  70. name: build-ios
  71. runs-on: macos-latest
  72. steps:
  73. - uses: actions/checkout@v3
  74. - name: build
  75. run: |
  76. mkdir cmake-build-ios
  77. cd cmake-build-ios
  78. cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DPLATFORM=OS64 -DARCHS="arm64" -DDEPLOYMENT_TARGET=9.0
  79. cmake --build . --target hv_static --config Release