72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
name: PR check
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**'
|
|
- '!**.md'
|
|
- '!.github/**'
|
|
- '.github/workflows/build_pull_request.yml'
|
|
|
|
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-24.04'
|
|
outputs:
|
|
matrix: ${{ steps.generate-matrices.outputs.matrix }}
|
|
delete: ${{ steps.generate-matrices.outputs.delete }}
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
|
with:
|
|
java-version: 17
|
|
distribution: temurin
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
|
with:
|
|
cache-read-only: true
|
|
|
|
- id: generate-matrices
|
|
name: Generate build matrices
|
|
run: |
|
|
git fetch origin main
|
|
python ./.github/scripts/generate-build-matrices.py origin/main Debug
|
|
|
|
build:
|
|
name: Build extensions (${{ matrix.chunk.number }})
|
|
needs: prepare
|
|
runs-on: 'ubuntu-24.04'
|
|
if: ${{ toJson(fromJson(needs.prepare.outputs.matrix).chunk) != '[]' }}
|
|
strategy:
|
|
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
|
with:
|
|
java-version: 17
|
|
distribution: temurin
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
|
with:
|
|
cache-read-only: true
|
|
|
|
- name: Build extensions (${{ matrix.chunk.number }})
|
|
run: |
|
|
./gradlew $(echo '${{ toJson(matrix.chunk.modules) }}' | jq -r 'join(" ")')
|