CI.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. name: CI——Benchmark
  2. on:
  3. push:
  4. branches: [ master ]
  5. env:
  6. # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  7. BUILD_TYPE: Release
  8. jobs:
  9. core:
  10. # The CMake configure and build commands are platform agnostic and should work equally
  11. # well on Windows or Mac. You can convert this to a matrix build if you need
  12. # cross-platform coverage.
  13. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  14. runs-on: ubuntu-22.04
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: INSTALL_PACKAGE
  18. run: |
  19. sudo apt update
  20. sudo apt install ninja-build
  21. sudo apt install liblua5.3-dev
  22. sudo apt install valgrind
  23. sudo apt install upx
  24. sudo apt install libmbedtls-dev
  25. sudo apt install lcov
  26. sudo apt install clang-tidy
  27. - name: install_google_benchmark
  28. run: |
  29. git clone https://github.com/google/benchmark.git
  30. cd benchmark
  31. cmake -E make_directory "build"
  32. cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../
  33. cmake --build "build" --config Release -j
  34. sudo cmake --build "build" --config Release --target install -j
  35. - name: PULL_CORE
  36. run: cd ${{github.workspace}}/port/linux && bash pull-core.sh
  37. - name: INIT
  38. run: cd ${{github.workspace}}/port/linux && bash init.sh
  39. - name: TEST
  40. # Build your program with the given configuration
  41. run: cd ${{github.workspace}}/port/linux && bash gtest.sh
  42. - name: Lcov
  43. run: cd ${{github.workspace}} && bash lcov.sh
  44. - name: Upload coverage reports to Codecov
  45. uses: codecov/codecov-action@v3
  46. with:
  47. file: ${{github.workspace}}/testHtml.info
  48. - name: VALGRIND
  49. run: cd ${{github.workspace}}/port/linux && bash valgrind.sh
  50. - name: BENCHMARK
  51. run: cd ${{github.workspace}}/port/linux && bash ci_benchmark.sh
  52. - name: CLEAR
  53. run: cd ${{github.workspace}}/port/linux && rm *.sh
  54. - name: Store benchmark result
  55. uses: benchmark-action/github-action-benchmark@v1
  56. with:
  57. tool: 'googlecpp'
  58. output-file-path: ${{github.workspace}}/port/linux/benchmark_result.json
  59. github-token: ${{ secrets.GITHUB_TOKEN }}
  60. auto-push: true
  61. # - name: Filter for perfoment point
  62. # run: |
  63. # git clone -b gh-pages https://github.com/pikastech/pikascript ${{github.workspace}}/../pikapages
  64. # cd ${{github.workspace}}/../pikapages/dev/bench
  65. # git config --global user.email "liang6516@outlook.com"
  66. # git config --global user.name "pikastech"
  67. # git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
  68. # git pull --rebase
  69. # pip3 install matplotlib
  70. # pip3 install numpy
  71. # python3 filter.py
  72. # git commit --allow-empty -a -m "update data_after.js"
  73. # git push
  74. # packageManager-windows:
  75. # runs-on: windows-latest
  76. # steps:
  77. # - uses: actions/checkout@v2
  78. # - name: PACKAGE_MANAGER
  79. # run: cd ${{github.workspace}}/tools/pikaPackageManager && go run main.go
  80. # bytecode-gen:
  81. # runs-on: windows-latest
  82. # steps:
  83. # - uses: actions/checkout@v2
  84. # - name: BYTECODE-GEN
  85. # run: |
  86. # cd ${{github.workspace}}/tools/pikaByteCodeGen
  87. # cd pikascript
  88. # ./pikaPackage.exe
  89. # cd ..
  90. # mkdir build
  91. # cd build
  92. # cmake ..