Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve flaky CI runs #215

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 77 additions & 66 deletions .github/workflows/ci-results-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- run: rustup toolchain update nightly && rustup default nightly
- name: Run benchmark
run: cd examples/rust && cargo +nightly bench | tee output.txt

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js

- name: Store benchmark result
uses: ./
with:
Expand All @@ -46,11 +48,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -60,11 +57,18 @@ jobs:
go-version: "stable"
- run: npm ci
- run: npm run build
- name: Run benchmark
run: cd examples/go && go test -bench 'BenchmarkFib' | tee output.txt

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Run benchmark
run: cd examples/go && go test -bench 'BenchmarkFib' | tee output.txt

- name: Store benchmark result
uses: ./
with:
Expand All @@ -81,22 +85,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Run benchmark
run: cd examples/benchmarkjs && npm install && node bench.js | tee output.txt

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Run benchmark
run: cd examples/benchmarkjs && npm install && node bench.js | tee output.txt

- name: Store benchmark result
uses: ./
with:
Expand All @@ -113,11 +119,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -127,14 +128,21 @@ jobs:
python-version: 3.9
- run: npm ci
- run: npm run build
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Run benchmark
run: |
cd examples/pytest
pip install -r requirements.txt
pytest bench.py --benchmark-json output.json

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js

- name: Store benchmark result
uses: ./
with:
Expand All @@ -151,20 +159,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Cache Benchmark library
uses: actions/cache@v4
with:
Expand All @@ -174,6 +174,16 @@ jobs:
run: |
cd examples/cpp
make json

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js

- name: Store benchmark result
uses: ./
with:
Expand All @@ -190,27 +200,29 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Run benchmark
run: |
cd examples/catch2
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
./Catch2_bench > ../benchmark_result.txt

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js

- name: Store benchmark result
uses: ./
with:
Expand All @@ -227,20 +239,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- uses: julia-actions/setup-julia@v1
with:
version: '1'
Expand All @@ -252,6 +256,16 @@ jobs:
using Pkg;
Pkg.instantiate();
include("fib.jl")'

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js

- name: Store benchmark result
uses: ./
with:
Expand All @@ -268,11 +282,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.101' # SDK Version to use. keep in line with examples/benchmarkdotnet/global.json
Expand All @@ -282,11 +291,18 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Run benchmark
run: cd examples/benchmarkdotnet && dotnet run --exporters json --filter '*'

- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- name: Save previous data.js
run: |
cp ./dist/other-repo/dev/bench/data.js before_data.js
- name: Run benchmark
run: cd examples/benchmarkdotnet && dotnet run --exporters json --filter '*'

- name: Store benchmark result
uses: ./
with:
Expand All @@ -303,11 +319,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: benchmark-action/github-action-benchmark-results
ref: 'gh-pages'
path: 'dist/other-repo'
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down
Loading
Loading