mirror of
https://github.com/Bixilon/Minosoft.git
synced 2026-12-04 15:28:22 +00:00
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Gradle CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ master ]
|
|
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
|
|
|
|
jobs:
|
|
gradle:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ "ubuntu", "windows", "macos" ]
|
|
runs-on: ${{ matrix.os }}-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- uses: actions/setup-java@v5
|
|
with:
|
|
distribution: zulu
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v3
|
|
|
|
- name: Setup Gradle Dependencies Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ matrix.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }}
|
|
|
|
|
|
- name: Setup Gradle Wrapper Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ matrix.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
|
|
|
- name: Setup Gradle Wrapper Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ./it
|
|
key: minosoft-assets
|
|
|
|
- name: Build
|
|
run: './gradlew assemble "-Pminosoft.updates=true"'
|
|
|
|
- name: Unit test
|
|
run: './gradlew test'
|
|
|
|
- name: Integration test
|
|
run: './gradlew integrationTest'
|
|
|
|
- name: Package amd64
|
|
run: './gradlew fatJar "-Parchitecture=amd64" "-Pminosoft.updates=true"'
|
|
|
|
- name: Upload amd64 build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: 'minosoft-${{ matrix.os }}-amd64'
|
|
path: build/libs/minosoft-fat-*-amd64-*.jar
|
|
|
|
- name: Package aarch64
|
|
run: './gradlew fatJar "-Parchitecture=aarch64" "-Pminosoft.updates=true"'
|
|
|
|
- name: Upload aarch64 build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: 'minosoft-${{ matrix.os }}-aarch64'
|
|
path: build/libs/minosoft-fat-*-aarch64-*.jar
|