diff --git a/examples/cpp-cmake-codspeed.yml b/examples/cpp-cmake-codspeed.yml new file mode 100644 index 0000000..fdf124b --- /dev/null +++ b/examples/cpp-cmake-codspeed.yml @@ -0,0 +1,33 @@ +name: CodSpeed + +on: + push: + branches: + - "main" # or "master" + pull_request: # required to have reports on PRs + # `workflow_dispatch` allows CodSpeed to trigger backtest + # performance analysis in order to generate initial data. + workflow_dispatch: + +permissions: # optional for public repositories + contents: read + id-token: write # for OpenID Connect authentication with CodSpeed + +jobs: + codspeed: + name: Run benchmarks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build C++ benchmarks + run: | + mkdir -p build && cd build + cmake -DCODSPEED_MODE=simulation .. + make -j + + - name: Run C++ benchmarks + uses: CodSpeedHQ/action@v4 + with: + mode: simulation + run: ./path/to/built/benchmark diff --git a/examples/go-codspeed.yml b/examples/go-codspeed.yml new file mode 100644 index 0000000..2ad5acb --- /dev/null +++ b/examples/go-codspeed.yml @@ -0,0 +1,32 @@ +name: CodSpeed + +on: + push: + branches: + - "main" # or "master" + pull_request: # required to have reports on PRs + # `workflow_dispatch` allows CodSpeed to trigger backtest + # performance analysis in order to generate initial data. + workflow_dispatch: + +permissions: # optional for public repositories + contents: read + id-token: write # for OpenID Connect authentication with CodSpeed + +jobs: + codspeed: + name: Run benchmarks + runs-on: codspeed-macro + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Run Go benchmarks + uses: CodSpeedHQ/action@main + with: + mode: walltime # go only supports walltime mode + run: go test -bench=. -benchtime=5s diff --git a/examples/nodejs-typescript-codspeed.yml b/examples/nodejs-typescript-codspeed.yml index b064be1..25823c3 100644 --- a/examples/nodejs-typescript-codspeed.yml +++ b/examples/nodejs-typescript-codspeed.yml @@ -9,13 +9,14 @@ on: # performance analysis in order to generate initial data. workflow_dispatch: +permissions: # optional for public repositories + contents: read + id-token: write # for OpenID Connect authentication with CodSpeed + jobs: codspeed: name: Run benchmarks runs-on: ubuntu-latest - permissions: # optional for public repositories - contents: read - id-token: write # for OpenID Connect authentication with CodSpeed steps: - uses: actions/checkout@v4 diff --git a/examples/python-pytest-codspeed.yml b/examples/python-pytest-codspeed.yml index 84861c1..29ece5d 100644 --- a/examples/python-pytest-codspeed.yml +++ b/examples/python-pytest-codspeed.yml @@ -9,13 +9,14 @@ on: # performance analysis in order to generate initial data. workflow_dispatch: +permissions: # optional for public repositories + contents: read + id-token: write # for OpenID Connect authentication with CodSpeed + jobs: codspeed: name: Run benchmarks runs-on: ubuntu-latest - permissions: # optional for public repositories - contents: read - id-token: write # for OpenID Connect authentication with CodSpeed steps: - uses: actions/checkout@v4 diff --git a/examples/rust-cargo-codspeed.yml b/examples/rust-cargo-codspeed.yml index b9f9e27..bf4b39e 100644 --- a/examples/rust-cargo-codspeed.yml +++ b/examples/rust-cargo-codspeed.yml @@ -9,13 +9,14 @@ on: # performance analysis in order to generate initial data. workflow_dispatch: +permissions: # optional for public repositories + contents: read + id-token: write # for OpenID Connect authentication with CodSpeed + jobs: codspeed: name: Run benchmarks runs-on: ubuntu-latest - permissions: # optional for public repositories - contents: read - id-token: write # for OpenID Connect authentication with CodSpeed steps: - uses: actions/checkout@v4