Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin committed Nov 21, 2024
1 parent 9eb9dd2 commit 0024376
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit 0024376

Please sign in to comment.