diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48653ce17..43f5dc7c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: - os: ubuntu-latest java: 21 jobtype: 5 + - os: ubuntu-latest + java: 21 + jobtype: 6 runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -64,19 +67,28 @@ jobs: shell: bash run: | sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Shapeless.*" "runBenchmarks" - - name: Checkout 1.10.x Branch (4, 5) - if: ${{ github.event_name == 'pull_request' && (matrix.jobtype == 4 || matrix.jobtype == 5) }} + - name: Benchmark (AnalysisFormatBenchmark) (6) + if: ${{ matrix.jobtype == 6 }} + shell: bash + run: | + sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "runBenchmarks" + - name: Checkout Target Branch (4-6) + if: ${{ github.event_name == 'pull_request' && (matrix.jobtype >= 4 || matrix.jobtype <= 6) }} uses: actions/checkout@v4 with: - clean: false - ref: 1.10.x - - name: Benchmark (Scalac) against 1.10.x Branch (4) + ref: ${{ github.event.pull_request.base.ref }} + - name: Benchmark (Scalac) against Target Branch (4) if: ${{ github.event_name == 'pull_request' && matrix.jobtype == 4 }} shell: bash run: | - sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Scalac.*" "zincBenchmarks/Jmh/clean" "runBenchmarks" - - name: Benchmark (Shapeless) against 1.10.x Branch (5) + sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Scalac.*" "runBenchmarks" + - name: Benchmark (Shapeless) against Target Branch (5) if: ${{ github.event_name == 'pull_request' && matrix.jobtype == 5 }} shell: bash run: | - sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Shapeless.*" "zincBenchmarks/Jmh/clean" "runBenchmarks" + sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*Shapeless.*" "runBenchmarks" + - name: Benchmark (AnalysisFormatBenchmark) against Target Branch (6) + if: ${{ matrix.jobtype == 6 }} + shell: bash + run: | + sbt -v -Dfile.encoding=UTF-8 "-Dbenchmark.pattern=.*AnalysisFormatBenchmark.*" "runBenchmarks" diff --git a/internal/zinc-benchmarks/src/test/scala/xsbt/AnalysisFormatBenchmark.scala b/internal/zinc-benchmarks/src/test/scala/xsbt/AnalysisFormatBenchmark.scala index 353a52eb3..2c219c79c 100644 --- a/internal/zinc-benchmarks/src/test/scala/xsbt/AnalysisFormatBenchmark.scala +++ b/internal/zinc-benchmarks/src/test/scala/xsbt/AnalysisFormatBenchmark.scala @@ -62,26 +62,12 @@ class AnalysisFormatBenchmark { if (temp != null) IO.delete(temp) } - @Benchmark - def readBinary(bh: Blackhole): Unit = bh.consume(readAll("", FileAnalysisStore.binary(_))) - - @Benchmark - def readText(bh: Blackhole): Unit = bh.consume(readAll("-ref-text", FileAnalysisStore.text(_))) - @Benchmark def readConsistentBinary(bh: Blackhole): Unit = bh.consume( readAll("-ref-cbin", ConsistentFileAnalysisStore.binary(_, ReadWriteMappers.getEmptyMappers)) ) - @Benchmark - def writeBinary(bh: Blackhole): Unit = - bh.consume(writeAll("-test-bin", FileAnalysisStore.binary(_), cached)) - - @Benchmark - def writeText(bh: Blackhole): Unit = - bh.consume(writeAll("-test-text", FileAnalysisStore.text(_), cached)) - @Benchmark def writeConsistentBinary(bh: Blackhole): Unit = bh.consume(