CI.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 install ninja-build
  20. sudo apt install liblua5.3-dev
  21. sudo apt install valgrind
  22. sudo apt install upx
  23. sudo apt install libmbedtls-dev
  24. sudo apt install lcov
  25. sudo apt install clang-tidy
  26. - name: install_google_benchmark
  27. run: |
  28. git clone https://github.com/google/benchmark.git
  29. cd benchmark
  30. cmake -E make_directory "build"
  31. cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../
  32. cmake --build "build" --config Release -j
  33. sudo cmake --build "build" --config Release --target install -j
  34. - name: PULL_CORE
  35. run: cd ${{github.workspace}}/port/linux && bash pull-core.sh
  36. - name: INIT
  37. run: cd ${{github.workspace}}/port/linux && bash init.sh
  38. - name: TEST
  39. # Build your program with the given configuration
  40. run: cd ${{github.workspace}}/port/linux && bash gtest.sh
  41. - name: Lcov
  42. run: cd ${{github.workspace}} && bash lcov.sh
  43. - name: Upload coverage reports to Codecov
  44. uses: codecov/codecov-action@v3
  45. with:
  46. file: ${{github.workspace}}/testHtml.info
  47. - name: VALGRIND
  48. run: cd ${{github.workspace}}/port/linux && bash valgrind.sh
  49. - name: BENCHMARK
  50. run: cd ${{github.workspace}}/port/linux && bash ci_benchmark.sh
  51. - name: CLEAR
  52. run: cd ${{github.workspace}}/port/linux && rm *.sh
  53. - name: Store benchmark result
  54. uses: benchmark-action/github-action-benchmark@v1
  55. with:
  56. tool: 'googlecpp'
  57. output-file-path: ${{github.workspace}}/port/linux/benchmark_result.json
  58. github-token: ${{ secrets.GITHUB_TOKEN }}
  59. auto-push: true
  60. # - name: Filter for perfoment point
  61. # run: |
  62. # git clone -b gh-pages https://github.com/pikastech/pikascript ${{github.workspace}}/../pikapages
  63. # cd ${{github.workspace}}/../pikapages/dev/bench
  64. # git config --global user.email "liang6516@outlook.com"
  65. # git config --global user.name "pikastech"
  66. # git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
  67. # git pull --rebase
  68. # pip3 install matplotlib
  69. # pip3 install numpy
  70. # python3 filter.py
  71. # git commit --allow-empty -a -m "update data_after.js"
  72. # git push
  73. # packageManager-windows:
  74. # runs-on: windows-latest
  75. # steps:
  76. # - uses: actions/checkout@v2
  77. # - name: PACKAGE_MANAGER
  78. # run: cd ${{github.workspace}}/tools/pikaPackageManager && go run main.go
  79. # bytecode-gen:
  80. # runs-on: windows-latest
  81. # steps:
  82. # - uses: actions/checkout@v2
  83. # - name: BYTECODE-GEN
  84. # run: |
  85. # cd ${{github.workspace}}/tools/pikaByteCodeGen
  86. # cd pikascript
  87. # ./pikaPackage.exe
  88. # cd ..
  89. # mkdir build
  90. # cd build
  91. # cmake ..