-
Notifications
You must be signed in to change notification settings - Fork 27
54 lines (45 loc) · 1.21 KB
/
Copy pathcheck.yml
File metadata and controls
54 lines (45 loc) · 1.21 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
name: CI 编译检查
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
branches: [ "main", "dev" ]
paths-ignore:
- '**.md'
- '.trellis/**'
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
check-build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: 检出代码
uses: actions/checkout@v5
- name: 设置 JDK 21
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: 设置 Gradle
uses: gradle/actions/setup-gradle@v5
- name: 授予 gradlew 执行权限
run: chmod +x gradlew
- name: 执行编译检查
run: |
./gradlew :app:assembleDebug --stacktrace || (
echo "Build failed, retrying in 15s..."
sleep 15
./gradlew :app:assembleDebug --stacktrace
)
env:
GRADLE_OPTS: >-
-Xmx2g
-Dfile.encoding=UTF-8
-Dorg.gradle.internal.http.connectionTimeout=180000
-Dorg.gradle.internal.http.socketTimeout=180000
CI_BUILD: "true"