-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.58 KB
/
code-agent-examples.yml
File metadata and controls
85 lines (74 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Code Agent Examples
on:
workflow_dispatch:
push:
branches: [ "main", "develop" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel only when the run is not on main or develop
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
env:
JAVA_VERSION: 17
JAVA_DISTRIBUTION: 'corretto'
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
koog-src: ${{ steps.filter.outputs.koog-src_any_modified }}
code-agent: ${{steps.filter.outputs.code-agent_any_modified }}
steps:
- uses: actions/checkout@v6
- uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a # v47.0.4
name: Check changed files
id: filter
with:
write_output_files: 'true'
files_yaml_from_source_file: .github/file-filters.yml
- run: .github/scripts/print_changed_files.sh
name: 'Print changed files'
compilation:
needs: changes
if: ${{ needs.changes.outputs.koog-src == 'true' || needs.changes.outputs.code-agent == 'true' }}
name: Compile ${{ matrix.step }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
step:
- step-01-minimal-agent
- step-02-add-execution-tool
- step-03-add-observability
- step-04-add-subagent
- step-05-history
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v6
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: gradle
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
# Cache downloaded JDKs/konan in addition to the default directories.
gradle-home-cache-includes: |
caches
notifications
jdks
~/.konan/**
- name: Compile
working-directory: ./examples/code-agent/${{ matrix.step }}
run: ./gradlew assemble testClasses --stacktrace
env:
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"