CI.yml 3.2 KB

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