Update workflows
This commit is contained in:
parent
377c71dfba
commit
f6238067fd
2 changed files with 73 additions and 181 deletions
|
@ -1,125 +1,77 @@
|
||||||
name: build-and-test
|
name: "PRs & Pushes"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- pull_request
|
- push
|
||||||
- push
|
- pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: git.staropensource.de/infrastructure/actions-docker:java
|
image: git.staropensource.de/infrastructure/actions-docker:java
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- name: Restore Gradle cache
|
- name: Restore Gradle cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
gradle-${{ runner.os }}-
|
gradle-${{ runner.os }}-
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: ./gradlew --no-daemon jar javadocJar sourceJar
|
run: ./gradlew --no-daemon jar
|
||||||
- name: Save Gradle cache
|
- name: Save Gradle cache
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
gradle-${{ runner.os }}-
|
gradle-${{ runner.os }}-
|
||||||
- name: Upload library JARs
|
- name: Upload JARs
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jars-libraries
|
name: jars-libraries
|
||||||
path: |
|
path: |
|
||||||
**/build/libs/*.jar
|
**/build/libs/*.jar
|
||||||
!**/build/libs/*-javadoc.jar
|
if-no-files-found: error
|
||||||
!**/build/libs/*-sources.jar
|
build-apidoc:
|
||||||
if-no-files-found: error
|
runs-on: docker
|
||||||
- name: Upload API documentation JARs
|
container:
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
image: git.staropensource.de/infrastructure/actions-docker:java
|
||||||
with:
|
steps:
|
||||||
name: jars-apidocs
|
- name: Checkout
|
||||||
path: |
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
**/build/libs/*-javadoc.jar
|
- name: Restore Gradle cache
|
||||||
if-no-files-found: error
|
uses: actions/cache/restore@v4
|
||||||
- name: Upload source JARs
|
with:
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
path: |
|
||||||
with:
|
~/.gradle/caches
|
||||||
name: jars-sources
|
~/.gradle/wrapper
|
||||||
path: |
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
**/build/libs/*-sources.jar
|
restore-keys: |
|
||||||
if-no-files-found: error
|
gradle-${{ runner.os }}-
|
||||||
generate-javadoc:
|
- name: Compile
|
||||||
runs-on: docker
|
run: ./gradlew --no-daemon dokkaHtml dokkaHtmlMultiModule dokkaHtmlJar dokkaJavadocJar
|
||||||
container:
|
- name: Save Gradle cache
|
||||||
image: git.staropensource.de/infrastructure/actions-docker:java
|
uses: actions/cache/save@v4
|
||||||
steps:
|
with:
|
||||||
- name: Checkout
|
path: |
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
~/.gradle/caches
|
||||||
- name: Restore Gradle cache
|
~/.gradle/wrapper
|
||||||
uses: actions/cache/restore@v4
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
with:
|
restore-keys: |
|
||||||
path: |
|
gradle-${{ runner.os }}-
|
||||||
~/.gradle/caches
|
- name: Upload JARs
|
||||||
~/.gradle/wrapper
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
with:
|
||||||
restore-keys: |
|
name: jars-libraries
|
||||||
gradle-${{ runner.os }}-
|
path: |
|
||||||
- name: Generate javadoc
|
build/dokka/htmlMultiModule
|
||||||
run: ./gradlew --no-daemon javadoc javadocAll
|
**/build/dokka/html
|
||||||
- name: Save Gradle cache
|
**/build/libs/*.jar
|
||||||
uses: actions/cache/save@v4
|
if-no-files-found: error
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
- name: Upload separate javadoc
|
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: javadoc-separate
|
|
||||||
path: |
|
|
||||||
**/build/docs/javadoc/*
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: Upload combined javadoc
|
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: javadoc-combined
|
|
||||||
path: |
|
|
||||||
build/docs/javadoc/*
|
|
||||||
if-no-files-found: error
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: git.staropensource.de/infrastructure/actions-docker:java
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
- name: Restore Gradle cache
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
- name: Run tests
|
|
||||||
run: ./gradlew --no-daemon test
|
|
||||||
- name: Save Gradle cache
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
name: build-and-test
|
|
||||||
|
|
||||||
on:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
generate-javadoc:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: git.staropensource.de/infrastructure/actions-docker:java
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
- name: Restore Gradle cache
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
- name: Generate javadoc
|
|
||||||
run: ./gradlew --no-daemon javadoc
|
|
||||||
- name: Save Gradle cache
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: git.staropensource.de/infrastructure/actions-docker:java
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
- name: Restore Gradle cache
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
||||||
- name: Run tests
|
|
||||||
run: ./gradlew --no-daemon test
|
|
||||||
- name: Save Gradle cache
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-${{ runner.os }}-
|
|
Loading…
Reference in a new issue