1313 # Results and other data are stored away from the main branch.
1414 # This keeps the main branch clean and allows us to clear out
1515 # objects / history after being built up for long periods of time.
16- BRANCH_NAME : pandas_20250109
16+ BRANCH_NAME : pandas_20250203
1717
1818permissions :
1919 contents : read
2929 contents : write
3030 issues : write
3131 outputs :
32- new_commit : ${{ steps.new -commit.outputs.new_commit }}
32+ new_commit : ${{ steps.get -commit.outputs.new_commit }}
3333 steps :
3434 # In order to run pandas' actions, we have to checkout into the root directory.
3535 - name : Checkout pandas
@@ -44,60 +44,62 @@ jobs:
4444 ref : ${{ env.BRANCH_NAME }}
4545 path : asv-runner/
4646
47- - name : Compare Commit SHAs
48- id : new-commit
47+ - name : Set up Conda
48+ uses : ./.github/actions/setup-conda
49+
50+ - name : Get Commit
51+ id : get-commit
4952 run : |
50- if [ "$(git rev-parse HEAD)" = "$(cat asv-runner/data/latest_sha.txt)" ]; then
53+ sha="$(python asv-runner/ci/find_commit_to_run.py --input-path=asv-runner/data/ --repo-path=.)"
54+ echo "sha: $sha"
55+ if [ "$sha" = "NONE" ]; then
5156 echo "new_commit=no"
5257 echo "new_commit=no" >> "$GITHUB_OUTPUT"
5358 else
5459 echo "new_commit=yes"
5560 echo "new_commit=yes" >> "$GITHUB_OUTPUT"
5661 fi
57- echo "$(git rev-parse HEAD)" > asv-runner/data/latest_sha.txt
62+ echo "$sha" >> asv-runner/data/shas.txt
63+ git checkout $sha
5864
5965 # Prevent another job from kicking off and running on this commit
60- - name : Update latest_sha .txt
61- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
66+ - name : Commit shas .txt
67+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
6268 uses : stefanzweifel/git-auto-commit-action@v5
6369 with :
64- commit_message : Update latest SHA
70+ commit_message : Update shas.txt
6571 branch : ${{ env.BRANCH_NAME }}
6672 repository : asv-runner
67- file_pattern : ' data/latest_sha.txt'
68-
69- - name : Set up Conda
70- if : ${{ steps.new-commit.outputs.new_commit == 'yes' }}
71- uses : ./.github/actions/setup-conda
73+ file_pattern : ' data/shas.txt'
7274
7375 - name : Build pandas
74- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
76+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
7577 uses : ./.github/actions/build_pandas
7678
7779 - name : Run ASV Benchmarks
78- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
80+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
7981 run : |
8082 cd asv_bench
8183 asv machine --machine=asvrunner --yes
8284 asv run --machine=asvrunner --python=same --set-commit-hash=$(git rev-parse HEAD) --show-stderr
8385
8486 - name : Update asv-runner branch
8587 # In case there was a push by another job.
86- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
88+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
8789 run : |
8890 cd asv-runner
8991 git fetch && git pull
9092
9193 - name : Move results into asv-runner
92- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
94+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
9395 run : |
9496 mkdir -p asv-runner/data/results/asvrunner/
9597 cp asv_bench/results/benchmarks.json asv-runner/data/results/
9698 cp asv_bench/results/asvrunner/machine.json asv-runner/data/results/asvrunner/
97- cp asv_bench/results/asvrunner/$(git rev-parse --short=8 HEAD)-existing*.json asv-runner/data/results/asvrunner/
99+ cp asv_bench/results/asvrunner/$(git rev-parse --short=8 HEAD)-existing*.json asv-runner/data/results/asvrunner/$(git rev-parse HEAD).json
98100
99101 - name : Commit results to branch
100- if : ${{ steps.new -commit.outputs.new_commit == 'yes' }}
102+ if : ${{ steps.get -commit.outputs.new_commit == 'yes' }}
101103 uses : stefanzweifel/git-auto-commit-action@v5
102104 with :
103105 commit_message : Results
0 commit comments