-
Notifications
You must be signed in to change notification settings - Fork 181
151 lines (146 loc) · 4.83 KB
/
ios-test.yml
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
name: ios-test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
setup-versions:
runs-on: ubuntu-latest
outputs:
xcodePath: ${{ steps.set-xcode-path.outputs.xcodePath }}
javaVersion: ${{ steps.set-java-version.outputs.javaVersion }}
steps:
- id: set-xcode-path
name: Set Xcode path
run: |
xcode_version='13.0'
xcode_path="/Applications/Xcode_${xcode_version}.app"
echo "::set-output name=xcodePath::$xcode_path"
- id: set-java-version
name: Set Java version
run: |
java_version='11'
echo "::set-output name=javaVersion::$java_version"
build-modules:
name: "iOS Buid Test for Modules"
runs-on: macos-11
needs: setup-versions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ needs.setup-versions.outputs.javaVersion }}
- name: Select Xcode Version
run: sudo xcode-select -s "${{ needs.setup-versions.outputs.xcodePath }}"
- name: Show Xcode Version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
with:
arguments: "ios-framework:createXCFramework"
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- name: Generate Strings & Colors & Assets
working-directory: ./ios
run: make run-swiftgen
- name: Build Test Modules
working-directory: ./ios
run: make build-modules
test-modules:
name: "iOS Test for Modules"
runs-on: macos-11
needs: setup-versions
steps:
- uses: actions/checkout@v2
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- uses: actions/setup-java@v1
with:
java-version: ${{ needs.setup-versions.outputs.javaVersion }}
- name: Select Xcode Version
run: sudo xcode-select -s "${{ needs.setup-versions.outputs.xcodePath }}"
- name: Show Xcode Version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
with:
arguments: "ios-framework:createXCFramework"
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- name: Generate Strings & Colors & Assets
working-directory: ./ios
run: make run-swiftgen
- name: Build Test Modules
working-directory: ./ios
run: make test-modules
build-app-debug:
name: "iOS Buid Test on Debug Configuration"
runs-on: macos-11
needs: setup-versions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ needs.setup-versions.outputs.javaVersion }}
- name: Select Xcode Version
run: sudo xcode-select -s "${{ needs.setup-versions.outputs.xcodePath }}"
- name: Show Xcode Version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
with:
arguments: "ios-framework:createXCFramework"
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- name: Generate Strings & Colors & Assets
working-directory: ./ios
run: make run-swiftgen
- name: Build Test for Debug App
working-directory: ./ios
run: make build-app-debug
build-app-release:
name: "iOS Buid Test on Release Configuration"
runs-on: macos-11
needs: setup-versions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ needs.setup-versions.outputs.javaVersion }}
- name: Select Xcode Version
run: sudo xcode-select -s "${{ needs.setup-versions.outputs.xcodePath }}"
- name: Show Xcode Version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
env:
CONFIGURATION: Release
with:
arguments: "ios-framework:createXCFramework"
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- name: Generate Strings & Colors & Assets
working-directory: ./ios
run: make run-swiftgen
- name: Build Test for Release App
working-directory: ./ios
run: make build-app-release