2019-09-27 07:56:53 +00:00
|
|
|
name: Build
|
2019-09-14 08:16:13 +00:00
|
|
|
|
2019-09-30 14:37:52 +00:00
|
|
|
on: [push, pull_request]
|
2019-09-14 08:16:13 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2019-12-03 23:26:13 +00:00
|
|
|
name: Build
|
2019-09-14 08:16:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-10-22 20:21:33 +00:00
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v3
|
2019-09-14 08:16:13 +00:00
|
|
|
|
2022-10-22 20:21:33 +00:00
|
|
|
- name: Set up Java
|
|
|
|
uses: actions/setup-java@v3
|
2019-09-14 08:16:13 +00:00
|
|
|
with:
|
2022-10-25 21:36:21 +00:00
|
|
|
java-version: 17
|
2022-10-22 20:21:33 +00:00
|
|
|
distribution: 'temurin'
|
2019-09-14 08:16:13 +00:00
|
|
|
|
2022-10-22 20:21:33 +00:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
2020-02-08 11:17:45 +00:00
|
|
|
with:
|
2022-10-22 20:21:33 +00:00
|
|
|
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/mc-') }}
|
2020-02-08 11:17:45 +00:00
|
|
|
|
2021-04-28 20:24:27 +00:00
|
|
|
- name: Disable Gradle daemon
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
|
|
|
echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
|
|
|
|
|
2019-09-14 08:16:13 +00:00
|
|
|
- name: Build with Gradle
|
2021-01-09 19:50:27 +00:00
|
|
|
run: |
|
2021-04-28 20:24:27 +00:00
|
|
|
./gradlew assemble || ./gradlew assemble
|
|
|
|
./gradlew downloadAssets || ./gradlew downloadAssets
|
2022-09-11 13:11:32 +00:00
|
|
|
./gradlew build
|
2021-01-09 19:50:27 +00:00
|
|
|
|
2022-11-18 23:57:25 +00:00
|
|
|
- name: Run client tests
|
|
|
|
run: ./gradlew runGametestClient # Not checkClient, as no point running rendering tests.
|
|
|
|
|
2020-01-01 00:08:31 +00:00
|
|
|
- name: Upload Jar
|
2021-01-15 19:39:12 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-01-01 00:08:31 +00:00
|
|
|
with:
|
|
|
|
name: CC-Tweaked
|
2022-11-10 09:12:28 +00:00
|
|
|
path: projects/forge/build/libs
|
2020-01-01 00:08:31 +00:00
|
|
|
|
2022-09-11 13:11:32 +00:00
|
|
|
- name: Upload coverage
|
2021-08-20 21:33:09 +00:00
|
|
|
uses: codecov/codecov-action@v2
|
2021-05-17 16:31:58 +00:00
|
|
|
|
|
|
|
- name: Parse test reports
|
|
|
|
run: ./tools/parse-reports.py
|
|
|
|
if: ${{ failure() }}
|
2020-05-11 14:41:39 +00:00
|
|
|
|
2021-04-28 20:24:27 +00:00
|
|
|
- name: Run linters
|
2022-09-11 13:11:32 +00:00
|
|
|
uses: pre-commit/action@v3.0.0
|