-
Notifications
You must be signed in to change notification settings - Fork 5
104 lines (91 loc) · 2.82 KB
/
Copy pathrun-tests.yml
File metadata and controls
104 lines (91 loc) · 2.82 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
name: Run Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
run-tests:
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- target: jvmTest
name: JVM
os: ubuntu-latest
- target: wasmJsBrowserTest
name: Wasm
os: ubuntu-latest
- target: wasmWasiNodeTest
name: WASI
os: ubuntu-latest
- target: jsBrowserTest
name: JS
os: ubuntu-latest
- target: testAndroidHostTest
name: Android
os: ubuntu-latest
- target: iosSimulatorArm64Test
name: iOS Simulator
os: macos-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Fetch origin/main for Spotless ratchet
run: git fetch origin main
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Set up Android SDK
if: matrix.name == 'Android'
run: |
yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null 2>&1 || true
${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager "platforms;android-35" > /dev/null
- name: Add swap space
if: runner.os == 'Linux'
run: |
sudo swapoff -a || true
sudo rm -f /mnt/swapfile
sudo dd if=/dev/zero of=/mnt/swapfile bs=1M count=16384
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile
free -h
- name: Cache Kotlin/Native
if: runner.os == 'macOS'
uses: actions/cache@v4
with:
path: |
~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/.lock') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests
env:
GRADLE_OPTS: -Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
NODE_OPTIONS: --max-old-space-size=8192 --no-warnings
run: >-
./gradlew ${{ matrix.target }}
--stacktrace
--no-daemon
--no-parallel
--no-configuration-cache
--build-cache
-Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8"
-Dorg.gradle.workers.max=1
-Dkotlin.daemon.enabled=false