forked from Snapchat/djinni
-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (54 loc) · 1.95 KB
/
Copy pathbuild.yaml
File metadata and controls
63 lines (54 loc) · 1.95 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
name: Build and Test
on:
push:
branches:
- main
pull_request: {}
# Bazel-free CI: the generator is built and run via src/run-scalac (JDK 8 + Maven-fetched
# Scala 2.11 compiler), matching how the engine and test-suite regenerate. Two checks —
# one per JVM backend surface: the classic Java one and the new Kotlin one.
jobs:
java-backend:
name: Java backend (regenerate + golden drift)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '8'
- name: Regenerate the test-suite (run-scalac)
run: |
export DJINNI_NO_BAZEL=1
export DJINNI_RUNNER="$PWD/src/run-scalac"
./test-suite/run_djinni.sh
- name: Verify goldens are in sync (no drift)
run: |
if [ -n "$(git status --porcelain test-suite/generated-src)" ]; then
echo "::error::Generated sources drifted from committed goldens. Run test-suite/run_djinni.sh and commit."
git status --porcelain test-suite/generated-src
git --no-pager diff test-suite/generated-src
exit 1
fi
echo "Goldens in sync."
kotlin-backend:
name: Kotlin backend (compile -Werror)
runs-on: ubuntu-latest
env:
KOTLIN_VERSION: 2.1.20
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '8'
- name: Install Kotlin compiler
run: |
curl -sSLo /tmp/kotlin.zip \
"https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION}/kotlin-compiler-${KOTLIN_VERSION}.zip"
unzip -q /tmp/kotlin.zip -d "$HOME"
echo "$HOME/kotlinc/bin" >> "$GITHUB_PATH"
- name: Kotlin golden compile check (-Werror)
run: ./test-suite/kotlin-compile-check/check.sh