Tachiyomi-Extensions/.github/workflows/build_pull_request.yml

90 lines
2.5 KiB
YAML
Raw Normal View History

2021-02-01 22:51:54 +00:00
name: PR build check
on:
pull_request:
jobs:
check_wrapper:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
2021-02-13 00:05:45 +00:00
build_multisrc:
name: Build multisrc modules
2021-02-01 22:51:54 +00:00
needs: check_wrapper
runs-on: ubuntu-latest
2021-02-13 00:05:45 +00:00
strategy:
matrix:
2021-06-20 22:42:33 +00:00
lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
2021-02-01 23:15:27 +00:00
steps:
2021-02-01 22:51:54 +00:00
- name: Checkout PR
uses: actions/checkout@v2
- name: Set up JDK
2021-02-01 22:51:54 +00:00
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Generate sources from the multi-source library
uses: gradle/gradle-command-action@v1
2021-02-13 00:05:45 +00:00
env:
CI_MULTISRC: "true"
with:
arguments: :multisrc:generateExtensions
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
2021-02-13 00:05:45 +00:00
- name: Build "${{ matrix.lang }}" extensions
uses: gradle/gradle-command-action@v1
2021-02-13 00:05:45 +00:00
env:
CI_MULTISRC: "true"
CI_MATRIX_LANG: ${{ matrix.lang }}
2021-02-01 22:51:54 +00:00
with:
arguments: assembleRelease
distributions-cache-enabled: true
2021-02-01 22:51:54 +00:00
dependencies-cache-enabled: true
configuration-cache-enabled: true
2021-02-13 00:05:45 +00:00
build_individual:
name: Build individual modules
needs: check_wrapper
runs-on: ubuntu-latest
strategy:
matrix:
2021-06-20 22:42:33 +00:00
lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
2021-02-13 00:05:45 +00:00
steps:
- name: Checkout PR
uses: actions/checkout@v2
- name: Set up JDK
2021-02-13 00:05:45 +00:00
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build "${{ matrix.lang }}" extensions
uses: gradle/gradle-command-action@v1
2021-02-13 00:05:45 +00:00
env:
CI_MULTISRC: "false"
CI_MATRIX_LANG: ${{ matrix.lang }}
with:
arguments: assembleRelease
distributions-cache-enabled: true
2021-02-13 00:05:45 +00:00
dependencies-cache-enabled: true
configuration-cache-enabled: true