-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (54 loc) · 2.34 KB
/
ios.yaml
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: iOS tests
on: pull_request
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=\"-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false\" -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx8G,-XX:MaxMetaspaceSize=512m,-Dorg.gradle.daemon=false,-Dkotlin.incremental=false"
JAVA_OPTS: "-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build:
uses: ./.github/workflows/setup_macos.yaml
with:
gradleTask: compileKotlinIosSimulatorArm64
lint:
needs: build
runs-on: macos-14
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup tools and cache for workspace
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}
- name: ktLint
run: ./gradlew lintKotlin
- name: ktLint report
uses: actions/upload-artifact@v4
with:
name: ktLint report
path: build/reports/ktlint
if: ${{ failure() }}
test:
needs: build
runs-on: macos-14
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.build.outputs.projects) }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup tools and cache for workspace
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
arch: ${{ runner.arch == 'X86' && 'x86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'arm32' || 'arm64' }}
- name: run iOS tests
run: ./gradlew :${{ matrix.module }}:ios${{ runner.arch == 'X86' && 'X86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'SimulatorArm32' || 'SimulatorArm64' }}Test
- name: Upload iOS test artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.module}} iOS Test Report HTML
path: ${{ format('**{0}/build/reports/tests/ios{1}Test', matrix.module, runner.arch == 'X86' && 'X86' || runner.arch == 'X64' && 'x86_64' || runner.arch == 'ARM' && 'SimulatorArm32' || 'SimulatorArm64') }}