CI.yml 3.2 KB

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