-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (60 loc) · 2.21 KB
/
Copy pathtest.yml
File metadata and controls
75 lines (60 loc) · 2.21 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
name: Run Test
on:
# Unfiltered on main so every merge seeds the Gradle cache for PR builds.
push:
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- 'docs-site/**'
- '**/*.md'
- 'assets/**'
- '.claude/**'
- 'LICENSE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run tests
run: ./gradlew check
# A job of its own rather than a second step in `test`. `check` on the root build does not descend
# into included builds — it pulls in the agent plugin's jar, because the demo consumes it, but none
# of its tests — so these have to be asked for separately. Running them beside the root build
# rather than after it keeps two Gradle daemons and the compiler test framework off one runner's
# memory, and the two finish in parallel.
agent-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run agent plugin tests
run: ./gradlew -p jetwhale-agent-plugin check
# Kotlin/Native cannot build Apple targets on Linux, so the two jobs above skip every one of them —
# including `jetwhale-agent-runtime`'s appleMain, which reads `sockaddr_in` bytes positionally and
# subclasses two Objective-C delegate protocols. Without this job that code is first compiled by the
# release tag build, which is the worst place to discover it does not.
#
# macOS runners bill at a multiple of Linux ones, so this compiles and tests rather than running the
# whole `check` the Linux job already covers. Warm, it is well under a minute.
apple:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Compile Apple targets
run: >
./gradlew
compileKotlinIosArm64
compileKotlinIosSimulatorArm64
compileKotlinMacosArm64
- name: Run Apple tests
run: ./gradlew macosArm64Test iosSimulatorArm64Test