05f7b8fd04
ci / JVM build + tests (pull_request) Failing after 32s
shadowJar produces `standalone-0.1.0-all.jar` (archiveBaseName +
classifier.all), not `standalone-all.jar`. Use `*-all.jar` glob
patterns in upload + attach steps; works regardless of version.
🤖 Generated with [opencode]
90 lines
3.2 KiB
YAML
90 lines
3.2 KiB
YAML
# PR / push-build. Прогоняет unit-тесты на JVM, линтер gradle-плагинов
|
|
# и проверяет, что shadowJar'ы запускаемых модулей собираются без ошибок.
|
|
# Артефакты не публикует — этим занимается .gitea/workflows/release.yml.
|
|
#
|
|
# Зависимости (text-embedding-kmp) подтягиваются из caffeine Nexus.
|
|
# Все env secrets доступны через vars/secrets репозитория — см. начало
|
|
# release.yml для требуемых переменных.
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-jvm:
|
|
name: JVM build + tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'adopt'
|
|
|
|
- name: Gradle cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
.gradle
|
|
key: ${{ runner.os }}-gradle-agentik-${{ hashFiles('**/*.gradle.kts', '**/gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-agentik-
|
|
|
|
- name: Build + test (JVM only — самые быстрые таргеты)
|
|
shell: bash
|
|
run: |
|
|
./gradlew jvmTest \
|
|
-Dorg.gradle.jvmargs=-Xmx4096M \
|
|
--no-daemon --no-watch-fs --stacktrace
|
|
|
|
- name: Build :standalone shadowJar (smoke — запускаемый артефакт)
|
|
shell: bash
|
|
run: |
|
|
./gradlew :standalone:shadowJar \
|
|
-Dorg.gradle.jvmargs=-Xmx4096M \
|
|
--no-daemon --no-watch-fs --stacktrace
|
|
test -f standalone/build/libs/standalone-*-all.jar \
|
|
&& echo "shadowJar OK: $(du -h standalone/build/libs/standalone-*-all.jar)"
|
|
|
|
- name: Build :agentik-cli shadowJar
|
|
shell: bash
|
|
run: |
|
|
./gradlew :agentik-cli:shadowJar \
|
|
-Dorg.gradle.jvmargs=-Xmx4096M \
|
|
--no-daemon --no-watch-fs --stacktrace
|
|
test -f agentik-cli/build/libs/agentik-cli-all.jar \
|
|
&& echo "shadowJar OK: $(du -h agentik-cli/build/libs/agentik-cli-all.jar)"
|
|
|
|
- name: Build :agentik-tui shadowJar
|
|
shell: bash
|
|
run: |
|
|
./gradlew :agentik-tui:shadowJar \
|
|
-Dorg.gradle.jvmargs=-Xmx4096M \
|
|
--no-daemon --no-watch-fs --stacktrace
|
|
test -f agentik-tui/build/libs/agentik-tui-all.jar \
|
|
&& echo "shadowJar OK: $(du -h agentik-tui/build/libs/agentik-tui-all.jar)"
|
|
|
|
- name: Upload shadowJars
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: agentik-jars
|
|
path: |
|
|
standalone/build/libs/standalone-all.jar
|
|
agentik-cli/build/libs/agentik-cli-all.jar
|
|
agentik-tui/build/libs/agentik-tui-all.jar
|
|
if-no-files-found: error
|
|
retention-days: 7
|