CI.yml 3.5 KB

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