Merge branch 'master' of https://github.com/Aleksei-Kutuzov/PrismEngine #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Performance benchmarks | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: write # äëÿ îáíîâëåíèÿ gh-pages | |
| pull-requests: write # äëÿ êîììåíòàðèåâ â PR | |
| env: | |
| BUILD_CONFIG: Release | |
| jobs: | |
| benchmark: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} | |
| - name: Build benchmarks | |
| run: cmake --build build --config ${{ env.BUILD_CONFIG }} --target benchmarks | |
| - name: Run benchmarks | |
| working-directory: build/bin/${{ env.BUILD_CONFIG }} | |
| run: .\benchmarks.exe --benchmark_format=json --benchmark_out=benchmark_result.json | |
| shell: cmd | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: build/bin/build/bin/${{ env.BUILD_CONFIG }}/benchmark_result.json | |
| - name: Create gh-pages branch if not exists | |
| run: | | |
| git fetch origin gh-pages || ( | |
| git checkout --orphan gh-pages && | |
| git rm -rf . && | |
| git commit --allow-empty -m "Initial gh-pages branch" && | |
| git push origin gh-pages | |
| ) | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: "ECS Benchmarks" | |
| tool: "googlecpp" | |
| output-file-path: build/bin/${{ env.BUILD_CONFIG }}/benchmark_result.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: ${{ github.ref == 'refs/heads/master' }} | |
| comment-on-alert: true | |
| fail-on-alert: false | |
| alert-threshold: "200%" |