Nearly there! Make the comparison a string comparison to evaluate pro… #62
This file contains 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: Benchmark tests | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
# deployments permission to GH-pages site | |
deployments: write | |
# contents permission to update GH-pages content | |
contents: write | |
jobs: | |
benchmark: | |
name: Performance regression check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4.6.1 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Run benchmark | |
run: | | |
UNIQUE_ID=${GITHUB_EVENT_NAME}_${GITHUB_RUN_NUMBER}_${GITHUB_SHA} >> $GITHUB_ENV | |
python benchmark.py --pyis --stats --output_dir outputs/ --output_name ${UNIQUE_ID} -n 250 | |
# Writing benchmarks to move to deployment/target repo | |
# python write_json_data.py ${{ github.workspace }}/outputs/${UNIQUE_ID}.json ${{ github.workspace }}/benchmark_records/new_record.json | |
# - name: Push benchmark result to pages | |
# uses: benchmark-action/github-action-benchmark@v1 | |
# with: | |
# # What benchmark tool the output.txt came from | |
# tool: 'customSmallerIsBetter' | |
# # Where the output from the benchmark tool is stored | |
# output-file-path: ${{ github.workspace }}/benchmark_records/new_record.json | |
# # Access token to deploy to GH-pages branch | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# # gh-pages branch name | |
# gh-pages-branch: gh-pages | |
# # directory on gh-pages branch to place benchmark dashboard page | |
# benchmark-data-dir-path: ./benchmarking | |
# # Workflow will fail when an alert happens | |
# fail-on-alert: true | |
# # Push and deploy automatically | |
# auto-push: true | |
- name: Push profiling results to pages | |
uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.TARGET_ACCESS_TOKEN }} | |
with: | |
source_file: 'outputs' | |
destination_repo: 'willGraham01/benchmark-action-playtest-target' | |
destination_folder: '.' | |
destination_branch: 'target' | |
user_email: ccaegra@ucl.ac.uk | |
user_name: willGraham01 | |
- name: Trigger website rebuild | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.TARGET_ACCESS_TOKEN }} | |
repository: willGraham01/benchmark-action-playtest-target | |
event-type: new-profiling-results |