forked from keiyoushi/extensions-source
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (69 loc) · 2.19 KB
/
build_pull_request.yml
File metadata and controls
81 lines (69 loc) · 2.19 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
name: PR check
on:
pull_request:
paths:
- '**'
- '!**.md'
- '!.github/**'
- '.github/workflows/build_pull_request.yml'
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
CI_CHUNK_SIZE: 65
IS_PR_CHECK: true
jobs:
prepare:
name: Prepare job
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
matrix: ${{ steps.generate-matrices.outputs.matrix }}
delete: ${{ steps.generate-matrices.outputs.delete }}
steps:
- name: Checkout PR
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
with:
cache-read-only: true
- id: generate-matrices
name: Generate build matrices
run: |
python ./.github/scripts/generate-build-matrices.py origin/main Debug
build:
name: Build extensions (${{ matrix.chunk.number }})
needs: prepare
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ toJson(fromJson(needs.prepare.outputs.matrix).chunk) != '[]' }}
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout PR
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
with:
cache-read-only: true
- name: Build extensions (${{ matrix.chunk.number }})
env:
MODULES: ${{ join(matrix.chunk.modules, ' ') }}
run: |
./gradlew $MODULES