diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 75a5722af5..44fb533fdf 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -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/github-action-benchmark@v1.18.0 with: