From db56c0538a2a4dc3515d66842aee49a2647f1126 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 18:25:22 +0200 Subject: [PATCH] misc: add CI workflows for PRs and commits (#1) Reviewed-on: https://git.staropensource.de/StarOpenSource/Engine/pulls/1 Co-authored-by: JeremyStarTM Co-committed-by: JeremyStarTM --- .forgejo/workflows/build-and-test.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .forgejo/workflows/build-and-test.yml diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml new file mode 100644 index 0000000..a238d26 --- /dev/null +++ b/.forgejo/workflows/build-and-test.yml @@ -0,0 +1,71 @@ +name: build-and-test + +on: + - pull_request + - push + +jobs: + build: + runs-on: docker + container: + image: git.staropensource.de/staropensource/actions-docker:java + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Compile + run: ./gradlew --no-daemon jar javadocJar sourceJar + - name: Upload library JARs + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: jars-libraries + path: | + **/build/libs/*.jar + !**/build/libs/*-javadoc.jar + !**/build/libs/*-sources.jar + if-no-files-found: error + - name: Upload API documentation JARs + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: jars-apidocs + path: | + **/build/libs/*-javadoc.jar + if-no-files-found: error + - name: Upload source JARs + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: jars-sources + path: | + **/build/libs/*-sources.jar + if-no-files-found: error + generate-javadoc: + runs-on: docker + container: + image: git.staropensource.de/staropensource/actions-docker:java + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Generate javadoc + run: ./gradlew --no-daemon javadoc javadocAll + - 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/staropensource/actions-docker:java + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Run tests + run: ./gradlew --no-daemon test