-
Notifications
You must be signed in to change notification settings - Fork 25
116 lines (97 loc) · 2.98 KB
/
build.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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Spotless check
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: 17
- name: spotless
run: ./gradlew spotlessCheck
api_check:
name: API check
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: 17
- name: API check
run: ./gradlew apiCheck
build:
strategy:
matrix:
platform: [ android, ios, web-wasm, web-js, desktop ]
include:
- platform: android
os: ubuntu-latest
- platform: web-wasm
os: ubuntu-latest
- platform: web-js
os: ubuntu-latest
- platform: ios
os: macos-latest
- platform: desktop
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Java and Gradle set up
if: matrix.platform != 'ios'
uses: ./.github/workflows/setup/java-setup
- name: iOS set up
if: matrix.platform == 'ios'
uses: ./.github/workflows/setup/ios-setup
# Android
- name: Grant execute permission for Android script
if: matrix.platform == 'android'
run: chmod +x ./scripts/build_android.sh
- name: Build Android
if: matrix.platform == 'android'
run: ./scripts/build_android.sh
# iOS
- name: Grant execute permission for iOS script
if: matrix.platform == 'ios'
run: chmod +x ./scripts/build_ios.sh
- name: Build iOS
if: matrix.platform == 'ios'
run: ./scripts/build_ios.sh
# Web-WASM
- name: Grant execute permission for Web WASM script
if: matrix.platform == 'web-wasm'
run: chmod +x ./scripts/build_web_wasm.sh
- name: Build Web WASM
if: matrix.platform == 'web-wasm'
run: ./scripts/build_web_wasm.sh
# Web-JS
- name: Grant execute permission for Web JS script
if: matrix.platform == 'web-js'
run: chmod +x ./scripts/build_web_js.sh
- name: Build Web JS
if: matrix.platform == 'web-js'
run: ./scripts/build_web_js.sh
# MacOS
- name: Grant execute permission for MacOS script
if: matrix.platform == 'desktop'
run: chmod +x ./scripts/build_macos.sh
- name: Build MacOS
if: matrix.platform == 'desktop'
run: ./scripts/build_macos.sh