Skip to content

feat(internal): make level govern match-finding search depth #196

feat(internal): make level govern match-finding search depth

feat(internal): make level govern match-finding search depth #196

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# Code-quality gate + the targets whose tests actually EXECUTE on a Linux host:
# JVM, JS (Node + headless-Chrome), Wasm (wasmJs/wasmWasi on Node) and the
# linuxX64 Kotlin/Native binary. The macOS job below cross-compiles these but
# can't run the linuxX64 test binary; running them here closes that gap cheaply.
linux:
name: Quality gate & Linux tests (JVM/JS/Wasm/linuxX64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup JDK 21
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: Cache Konan (Kotlin/Native toolchain)
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
konan-${{ runner.os }}-
# Formatting (Spotless/ktlint) + static analysis (detekt) + the ABI check,
# then the tests that run natively on Linux. linuxX64Test builds and runs the
# Kotlin/Native test binary that the macOS host can only cross-compile.
- name: Quality gate & Linux/JVM/JS/Wasm tests
run: >-
./gradlew
spotlessCheck detekt apiCheck
jvmTest jsTest wasmJsTest wasmWasiTest linuxX64Test
--stacktrace
build:
name: Build, test & API check (all KMP targets)
# macOS is required to compile the Apple/native klibs (iOS, macOS, tvOS) — the
# whole value of kzstd is its multiplatform reach, so CI compiles every target,
# not just the JVM one.
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup JDK 21
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: Cache Konan (Kotlin/Native toolchain)
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
konan-${{ runner.os }}-
# `build` compiles all 13 targets, runs the common/jvm/js/wasm/macOS/iOS-sim
# tests, and runs `apiCheck` (binary-compatibility-validator). Linux/Windows
# native test binaries are cross-compiled but not executed on a macOS host.
- name: Build, test & API check
run: ./gradlew build --stacktrace
- name: Coverage report (Kover XML)
run: ./gradlew koverXmlReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: build/reports/kover/report.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}