Schedule a nightly run of the Score Director performance benchmark #32
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: Schedule a nightly run of the Score Director performance benchmark | |
on: | |
schedule: | |
- cron: '59 23 * * 1-5' # Every workday at the end of the day. | |
jobs: | |
trigger: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout timefold-solver-benchmarks | |
uses: actions/checkout@v4 | |
with: | |
path: ./timefold-solver-benchmarks | |
repository: TimefoldAI/timefold-solver-benchmarks | |
- name: Checkout timefold-solver | |
uses: actions/checkout@v4 | |
with: | |
path: ./timefold-solver | |
repository: TimefoldAI/timefold-solver | |
- name: Schedule the other workflow | |
shell: bash | |
env: | |
GH_TOKEN: ${{ secrets.BENCHMARK_PUBLISH_TOKEN }} | |
run: | | |
cd timefold-solver | |
if git log --since="24 hours ago" --oneline | grep -q .; then | |
cd ../timefold-solver-benchmarks | |
echo '{}' | gh workflow run performance_score_director.yml --json | |
echo "Launched nightly perf tests." >> $GITHUB_STEP_SUMMARY | |
else | |
# Don't waste money. | |
echo "No commits in the past 24 hours." >> $GITHUB_STEP_SUMMARY | |
fi |