diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9130933..eaf65a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,10 @@ jobs: uses: coursier/cache-action@v8.1 - uses: VirtusLab/scala-cli-setup@v1 - name: Check formatting - run: scala-cli --power fmt --check . + # benchmark/ is a separate scala-cli build (competitor deps, JMH) — + # excluded here even for repos without one, since --exclude is a + # no-op glob filter when nothing matches. + run: scala-cli --power fmt --check . --exclude benchmark test: name: Test @@ -38,7 +41,7 @@ jobs: - name: Run tests # Coverage is recorded only for production sources; tests were previously # measured as 100%-covered and inflated the reported number. - run: scala-cli --power test . -O -coverage-out:./.scoverage -O '-coverage-exclude-files:.*test/.*' + run: scala-cli --power test . --exclude benchmark -O -coverage-out:./.scoverage -O '-coverage-exclude-files:.*test/.*' - name: Generate coverage run: scala-cli .scoverage/report.sc - uses: codecov/codecov-action@v7 @@ -47,7 +50,7 @@ jobs: files: .scoverage/report/cobertura.xml token: ${{ secrets.CODECOV_TOKEN }} - name: Test documentation - run: scala-cli --power doc . + run: scala-cli --power doc . --exclude benchmark compile: name: Compile (${{ matrix.platform }}) @@ -75,7 +78,7 @@ jobs: scala-build-${{ matrix.platform }}- - uses: VirtusLab/scala-cli-setup@v1 - name: Compile - run: scala-cli --power compile . --platform ${{ matrix.platform }} ${{ matrix.args }} + run: scala-cli --power compile . --exclude benchmark --platform ${{ matrix.platform }} ${{ matrix.args }} # JVM is covered by the `test` job above (with coverage/docs); this just runs # the same suite on the other targets to catch platform-specific regressions. @@ -103,4 +106,4 @@ jobs: scala-build-${{ matrix.platform }}- - uses: VirtusLab/scala-cli-setup@v1 - name: Run tests - run: scala-cli --power test . --platform ${{ matrix.platform }} ${{ matrix.args }} + run: scala-cli --power test . --exclude benchmark --platform ${{ matrix.platform }} ${{ matrix.args }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 2accc46..2af23ff 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -39,7 +39,7 @@ jobs: # name should differ from the repo slug, e.g. made -> "M&DE". PROJECT_NAME: ${{ vars.PROJECT_NAME || github.event.repository.name }} run: | - scala-cli --power doc . -- \ + scala-cli --power doc . --exclude benchmark -- \ -project "$PROJECT_NAME" \ -project-version ${{ github.ref_name }} \ -project-footer "made with ❤️ and coffee" \ diff --git a/.github/workflows/mima.yml b/.github/workflows/mima.yml index edba6da..6297041 100644 --- a/.github/workflows/mima.yml +++ b/.github/workflows/mima.yml @@ -45,15 +45,15 @@ jobs: org=$(grep -oP '(?<=using publish.organization ).*' project.scala | tr -d '"') name=$(grep -oP '(?<=using publish.name ).*' project.scala | tr -d '"') - scala-cli --power package . --library -o "$RUNNER_TEMP/new.jar" --force - shared_cp=$(scala-cli --power compile . --print-class-path | tail -1) + scala-cli --power package . --exclude benchmark --library -o "$RUNNER_TEMP/new.jar" --force + shared_cp=$(scala-cli --power compile . --exclude benchmark --print-class-path | tail -1) if [ "${{ github.event_name }}" = "pull_request" ]; then base_sha=$(git rev-parse HEAD^1) baseline_label="main@${base_sha:0:7}" echo "Baseline: $baseline_label (does this PR itself introduce a new binary incompatibility?)" git worktree add --detach --quiet "$RUNNER_TEMP/old-src" "$base_sha" - scala-cli --power package "$RUNNER_TEMP/old-src" --library -o "$RUNNER_TEMP/old.jar" --force + scala-cli --power package "$RUNNER_TEMP/old-src" --exclude benchmark --library -o "$RUNNER_TEMP/old.jar" --force old_jar="$RUNNER_TEMP/old.jar" else base_tag=$(git tag -l 'v*' --sort=-v:refname | head -1)