CI.yml 3.3 KB

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