2022-01-06 23:10:12 +08:00
|
|
|
name: CI——Benchmark
|
2021-10-06 22:37:29 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
2021-10-09 01:22:48 +08:00
|
|
|
core:
|
2021-10-06 22:37:29 +08:00
|
|
|
# The CMake configure and build commands are platform agnostic and should work equally
|
|
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
|
|
# cross-platform coverage.
|
|
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
2021-10-08 10:40:47 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-10-06 22:37:29 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-04 00:39:30 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: install_google_benchmark
|
|
|
|
run: git clone https://github.com/google/benchmark.git && cd benchmark && cmake -E make_directory "build" && cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../ && cmake --build "build" --config Release && sudo cmake --build "build" --config Release --target install
|
2022-01-04 00:39:30 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: PULL_CORE
|
|
|
|
run: cd ${{github.workspace}}/port/linux && bash pull-core.sh
|
2021-10-06 22:46:11 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: INIT
|
|
|
|
run: cd ${{github.workspace}}/port/linux && bash init.sh
|
2021-10-06 22:37:29 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: TEST
|
|
|
|
# Build your program with the given configuration
|
|
|
|
run: cd ${{github.workspace}}/port/linux && bash gtest.sh
|
2022-01-04 00:56:04 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: BENCHMARK
|
|
|
|
run: cd ${{github.workspace}}/port/linux && bash ci_benchmark.sh
|
2022-01-04 09:10:59 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: CLEAR
|
|
|
|
run: cd ${{github.workspace}}/port/linux && rm *.sh
|
2022-01-05 10:30:01 +08:00
|
|
|
|
2022-02-11 02:01:20 +08:00
|
|
|
- name: Store benchmark result
|
|
|
|
uses: benchmark-action/github-action-benchmark@v1
|
|
|
|
with:
|
|
|
|
tool: 'googlecpp'
|
|
|
|
output-file-path: ${{github.workspace}}/port/linux/benchmark_result.json
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
auto-push: true
|
2021-10-08 10:45:36 +08:00
|
|
|
|
2022-02-11 01:55:45 +08:00
|
|
|
- name: Filter for perfoment point
|
|
|
|
run: |
|
|
|
|
git clone -b gh-pages https://github.com/pikastech/pikascript ${{github.workspace}}/../pikapages
|
|
|
|
cd ${{github.workspace}}/../pikapages/dev/bench
|
|
|
|
git config --global user.email "liang6516@outlook.com"
|
|
|
|
git config --global user.name "pikastech"
|
|
|
|
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
|
|
git pull --rebase
|
2022-02-11 01:57:17 +08:00
|
|
|
pip3 install matplotlib
|
|
|
|
pip3 install numpy
|
2022-02-11 01:55:45 +08:00
|
|
|
python3 filter.py
|
2022-02-11 01:59:45 +08:00
|
|
|
git commit --allow-empty -a -m "update data_after.js"
|
2022-02-11 01:55:45 +08:00
|
|
|
git push
|
2021-10-08 10:48:36 +08:00
|
|
|
|