-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9eb9dd2
commit 0024376
Showing
1 changed file
with
21 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,11 +70,16 @@ jobs: | |
command: bench | ||
target: ${{ matrix.TARGET }} | ||
args: "--no-run --bench bench" | ||
- name: List benchmark files | ||
run: | | ||
echo "Available files in target directory:" | ||
find target/${{ matrix.TARGET }}/release -type f -name "bench-*" -not -name "*.d" | ||
- name: Upload benchmark binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: benchmark-binary | ||
path: target/${{ matrix.TARGET }}/release/deps/bench-* | ||
# Exclude .d files and only get the actual binary | ||
path: target/${{ matrix.TARGET }}/release/deps/bench-[0-9a-f]* | ||
retention-days: 1 | ||
|
||
run-bench: | ||
|
@@ -88,8 +93,6 @@ jobs: | |
with: | ||
name: benchmark-binary | ||
path: ./bench-binary | ||
- name: Make benchmark executable | ||
run: chmod +x ./bench-binary/* | ||
- name: Get previous benchmark data | ||
run: | | ||
echo "Fetching gh-pages branch" | ||
|
@@ -108,10 +111,23 @@ jobs: | |
echo "Checking out current previous branch" | ||
git checkout - | ||
- name: Debug downloaded files | ||
run: | | ||
echo "Files in bench-binary directory:" | ||
ls -la ./bench-binary/ | ||
- name: Make benchmark executable | ||
run: | | ||
chmod +x ./bench-binary/* | ||
find ./bench-binary -type f -executable -name "bench-*" -not -name "*.d" | ||
- name: Run benchmark | ||
run: | | ||
BENCH_BINARY=$(find ./bench-binary -type f -executable) | ||
$BENCH_BINARY --jobs 1 --bench bench -- --output-format bencher | tee output.txt || { echo "Benchmark failed"; exit 1; } | ||
BENCH_BINARY=$(find ./bench-binary -type f -executable -name "bench-*" -not -name "*.d" | head -n 1) | ||
echo "Found benchmark binary: $BENCH_BINARY" | ||
if [ -z "$BENCH_BINARY" ]; then | ||
echo "No benchmark binary found!" | ||
exit 1 | ||
fi | ||
$BENCH_BINARY --jobs 1 --bench bench -- --output-format bencher | tee output.txt || { echo "Benchmark failed"; exit 1; } | ||
- name: Compare results & store cached results | ||
uses: benchmark-action/[email protected] | ||
with: | ||
|