Skip to content

feat: make local-search arms optimize on a COP (SA annealing, objective-bound ratchet) #1440

feat: make local-search arms optimize on a COP (SA annealing, objective-bound ratchet)

feat: make local-search arms optimize on a COP (SA annealing, objective-bound ratchet) #1440

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
# A newer push supersedes any in-flight run for the same ref.
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
# Persists the Gradle home incl. the local build cache; every branch writes so
# repeated PR pushes hit it (GitHub scopes entries to the branch plus main). The
# encryption key additionally persists the configuration cache across runs.
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: false
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Cache Kotlin/Native toolchain
uses: actions/cache@v5
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-konan-
# Default target set is host-only (jvm + linuxX64); the full matrix (apple, windows,
# js/wasm with their browser/node runtimes) is opt-in via -Ptargets.full and builds
# and tests on release.
# `check` runs tests without lintDocs (detekt + dokka), which the parallel `lint` job
# already covers. Keeping them separate avoids running lintDocs twice per push.
- name: Run tests with coverage
run: ./gradlew check koverXmlReport
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: test-reports
path: |
klause/build/reports/tests/
klause/build/test-results/
if-no-files-found: ignore
- name: Upload results to Codecov (main only)
if: github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: klause/build/reports/kover/report.xml
fail_ci_if_error: false
# Repo-wide lintDocs: detekt plus dokka with fail-on-warning, for KDoc-link validation
# parity with the other modules. dokka's full doc generation is the slowest thing in CI,
# so it runs as its own job — still a required check, but in parallel with `test` rather
# than serially in front of it.
lint:
name: Lint and validate docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: false
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Cache Kotlin/Native toolchain
uses: actions/cache@v5
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-konan-
- name: Run linter
run: ./gradlew lintDocs