This repository was archived by the owner on Jan 31, 2026. It is now read-only.
fix: package generation #16
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
| # Comment performance benchmarking on every push. | |
| name: Benchmarking. | |
| on: push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| benchtest: [short_sample, short_dropshot, full_rumble, oce_rlcs, intensive_oce_rlcs] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v1 | |
| with: | |
| python-version: '3.7' | |
| architecture: 'x64' | |
| - name: Install/Update pip and wheel. | |
| run: | |
| python -m pip install --upgrade pip && | |
| pip install wheel | |
| - name: Set-up and install protobuf. | |
| run: chmod 777 ./_travis/install-protoc.sh && ./_travis/install-protoc.sh 2.6.1 | |
| - name: Install dependencies. | |
| run: pip install -r requirements.txt && pip install -r requirements-test.txt | |
| - name: Initialise. | |
| run: python init.py | |
| - name: Prepare benchmark. | |
| run: | | |
| pip install -r requirements.txt && pip install -r requirements-test.txt | |
| cd carball/tests/benchmarking | |
| echo === BENCHMARK DIRECTORY === | |
| ls -lh | |
| echo =========================== | |
| - name: Run benchmark. | |
| run: | | |
| cd carball/tests/benchmarking | |
| pytest benchmarking.py --benchmark-json carball_benchmarking.json -k 'test_${{matrix.benchtest}}' | |
| - name: Process and store benchmark ${{matrix.benchtest}}. | |
| uses: rhysd/github-action-benchmark@v1 | |
| with: | |
| name: Carball Benchmarks ${{matrix.benchtest}} | |
| tool: 'pytest' | |
| output-file-path: carball/tests/benchmarking/carball_benchmarking.json | |
| benchmark-data-dir-path: dev/bench/${{matrix.benchtest}}/ | |
| # Use personal access token instead of GITHUB_TOKEN due to | |
| # https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: false | |
| alert-threshold: '125%' # If performance is 1.25x worse, there will be an alert | |
| comment-always: true | |
| fail-on-alert: true |