-
Notifications
You must be signed in to change notification settings - Fork 353
194 lines (184 loc) · 6.55 KB
/
v2-core.yml
File metadata and controls
194 lines (184 loc) · 6.55 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: v2 core
on:
pull_request:
paths:
- 'core/**'
- 'engines/**'
- 'solutions/**'
- 'frontends/**'
- 'idl/**'
- 'cmake/**'
- 'tools/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'vcpkg.json'
- '.github/workflows/v2-core.yml'
push:
branches: [main]
paths:
- 'core/**'
- 'engines/**'
- 'solutions/**'
- 'frontends/**'
- 'idl/**'
- 'cmake/**'
- 'tools/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'vcpkg.json'
- '.github/workflows/v2-core.yml'
workflow_dispatch:
concurrency:
group: v2-core-${{ github.ref }}
cancel-in-progress: true
jobs:
# ---------------------------------------------------------------------------
# C++ core + engines + solutions — macOS Debug (ASan + UBSan).
# ---------------------------------------------------------------------------
cpp-macos:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: |
brew install cmake ninja protobuf
- name: Configure (macOS Debug, sanitizers ON)
run: |
cmake --preset macos-debug -DRA_BUILD_ENGINES=ON -DRA_BUILD_SOLUTIONS=ON
- name: Build
run: cmake --build --preset macos-debug
- name: Test
run: ctest --preset macos-debug --output-on-failure
# ---------------------------------------------------------------------------
# C++ core + engines + solutions — Linux Debug (ASan + UBSan).
# ---------------------------------------------------------------------------
cpp-linux:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cmake ninja-build g++ protobuf-compiler libprotobuf-dev libgtest-dev
- name: Configure (Linux Debug, sanitizers ON)
run: |
cmake --preset linux-debug -DRA_BUILD_ENGINES=ON -DRA_BUILD_SOLUTIONS=ON
- name: Build
run: cmake --build --preset linux-debug
- name: Test
run: ctest --preset linux-debug --output-on-failure
# ---------------------------------------------------------------------------
# Proto codegen — verify checked-in generated files are up-to-date.
# ---------------------------------------------------------------------------
proto-codegen-swift:
runs-on: macos-14
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install protoc + swift-protobuf
run: brew install protobuf swift-protobuf
- name: Regenerate Swift bindings
run: ./idl/codegen/generate_swift.sh
- name: Verify no drift (only when generated files are already committed)
run: |
# Phase 0 bootstrap: Generated/ only contains .gitkeep. After the
# first real landing of generated files (tracked under
# Generated/*.pb.swift), the drift check becomes strict.
TRACKED_PB=$(git ls-files 'frontends/swift/Sources/RunAnywhere/Generated/*.pb.swift')
if [[ -z "$TRACKED_PB" ]]; then
echo "No generated .pb.swift files tracked yet — drift check skipped until first codegen PR."
exit 0
fi
if [[ -n "$(git status --porcelain frontends/swift/Sources/RunAnywhere/Generated)" ]]; then
echo "Generated Swift files are stale. Run ./idl/codegen/generate_swift.sh and commit." >&2
git --no-pager diff frontends/swift/Sources/RunAnywhere/Generated >&2
exit 1
fi
# ---------------------------------------------------------------------------
# Swift frontend — SwiftPM build + test (macOS). Generated/ stays empty in
# this PR so SwiftPM falls back to adapter-only compilation.
# ---------------------------------------------------------------------------
swift-frontend:
runs-on: macos-14
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
with:
swift-version: '5.9'
- name: Build RunAnywhereV2 (SwiftPM)
working-directory: frontends/swift
run: swift build -v
- name: Run tests
working-directory: frontends/swift
run: swift test -v
# ---------------------------------------------------------------------------
# Kotlin frontend — Gradle build + unit tests.
# ---------------------------------------------------------------------------
kotlin-frontend:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Build frontends/kotlin
working-directory: frontends/kotlin
run: gradle --no-daemon build
- name: Test frontends/kotlin
working-directory: frontends/kotlin
run: gradle --no-daemon test
# ---------------------------------------------------------------------------
# Dart frontend — analyze + test.
# ---------------------------------------------------------------------------
dart-frontend:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Pub get
working-directory: frontends/dart
run: dart pub get
- name: Analyze
working-directory: frontends/dart
run: dart analyze
- name: Test
working-directory: frontends/dart
run: dart test
# ---------------------------------------------------------------------------
# TS / RN frontend — tsc + vitest.
# ---------------------------------------------------------------------------
ts-frontend:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install TS deps
working-directory: frontends/ts
run: npm install --no-save
- name: Typecheck TS
working-directory: frontends/ts
run: npm run typecheck
- name: Test TS
working-directory: frontends/ts
run: npm test
- name: Install Web deps
working-directory: frontends/web
run: npm install --no-save
- name: Typecheck Web
working-directory: frontends/web
run: npm run typecheck
- name: Test Web
working-directory: frontends/web
run: npm test