Skip to content

Commit

Permalink
Extract benchmark job to a separate workflow, to stop marking build a…
Browse files Browse the repository at this point in the history
…s constantly failed
  • Loading branch information
MateuszKubuszok committed Nov 5, 2023
1 parent 37c5c14 commit 78db989
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 45 deletions.
46 changes: 2 additions & 44 deletions .github/workflows/ci.yml → .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI build
name: Benchmark

on:
push:
Expand All @@ -9,50 +9,8 @@ on:
types: [ opened, reopened, labeled, synchronize ]

jobs:
check-formatting:

runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.action != 'labeled' # run for 'opened', 'reopened' and 'synchronize'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/setup-action@v1.3.0
with:
apps: scalafmt
- name: Check code and docs formatting
run: scalafmt --check

build:

runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.action != 'labeled' # run for 'opened', 'reopened' and 'synchronize'

strategy:
matrix:
scala: ["2_12", "2_13", "3"]
platform: ["jvm", "js", "native"]
jvm: ['temurin:1.8.0-392', 'temurin:1.21.0.1']
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1.3.0
with:
jvm: ${{ matrix.jvm }}
apps: sbt
- name: Clean, compile, test, generate coverage report, check MiMa
run: sbt ci-${{ matrix.platform }}-${{ matrix.scala }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

benchmark:
needs: build

runs-on: benchmarks
concurrency: 'benchmark'
if: >
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI build

on:
push:
branches: [ master ]
tags: [ '*' ]
pull_request:
branches: [ master ]
types: [ opened, reopened, labeled, synchronize ]

jobs:
check-formatting:

runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.action != 'labeled' # run for 'opened', 'reopened' and 'synchronize'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/setup-action@v1.3.0
with:
apps: scalafmt
- name: Check code and docs formatting
run: scalafmt --check

build:

runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.action != 'labeled' # run for 'opened', 'reopened' and 'synchronize'

strategy:
matrix:
scala: ["2_12", "2_13", "3"]
platform: ["jvm", "js", "native"]
jvm: ['temurin:1.8.0-392', 'temurin:1.21.0.1']
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1.3.0
with:
jvm: ${{ matrix.jvm }}
apps: sbt
- name: Clean, compile, test, generate coverage report, check MiMa
run: sbt ci-${{ matrix.platform }}-${{ matrix.scala }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/publish-benchmark-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Publish benchmark results

on:
workflow_run:
workflows: [ 'CI build' ]
workflows: [ 'Benchmark' ]
types: [ completed ]

jobs:
push-to-data-repo:

runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
Expand Down

0 comments on commit 78db989

Please sign in to comment.