From 039f18774a01efd4011a8bb4463b8ba0255be0d7 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:06:25 +0200 Subject: [PATCH 01/19] Does this work? --- .forgejo/workflows/build-and-test.yml | 47 +++++++++++++++++++++++++++ 1 file changed, 47 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..2cc3ee3 --- /dev/null +++ b/.forgejo/workflows/build-and-test.yml @@ -0,0 +1,47 @@ +name: build-and-test + +on: + - pull_request + - push + +jobs: + build: + runs-on: docker + container: + image: archlinux:base-devel + steps: + - name: Setup system + run: | + pacman-key --init + pacman-key --populate + sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman/pacman.conf + pacman -Syu --noconfirm + - name: Install latest OpenJDK release + run: pacman -S --noconfirm jdk-openjdk + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Compile + run: gradle build + - name: Upload artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: library-jars + path: | + **/build/libs/*.jar + !**/build/libs/*-javadoc.jar + !**/build/libs/*-source.jar + if-no-files-found: error + - name: Upload artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: apidoc-jars + path: | + **/build/libs/*-javadoc.jar + if-no-files-found: error + - name: Upload artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: source-jars + path: | + **/build/libs/*-source.jar + if-no-files-found: error -- 2.45.2 From 2d9dccedcaa0af4a0e3fc755c1c1afd5bfc8855f Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:08:04 +0200 Subject: [PATCH 02/19] Change runs-on --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 2cc3ee3..4360e22 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: docker + runs-on: archlinux container: image: archlinux:base-devel steps: -- 2.45.2 From bc461b25e3c8673b201d0ae055ef52f70d5097dd Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:11:01 +0200 Subject: [PATCH 03/19] Fix wrong pacman.conf location --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 4360e22..8811a39 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -14,7 +14,7 @@ jobs: run: | pacman-key --init pacman-key --populate - sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman/pacman.conf + sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf pacman -Syu --noconfirm - name: Install latest OpenJDK release run: pacman -S --noconfirm jdk-openjdk -- 2.45.2 From f2aef64ab072fbc412afe2c98532045566523fb9 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:11:30 +0200 Subject: [PATCH 04/19] Add set -x --- .forgejo/workflows/build-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 8811a39..11abe09 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -12,6 +12,7 @@ jobs: steps: - name: Setup system run: | + set -x pacman-key --init pacman-key --populate sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf -- 2.45.2 From 34c4e86e2be946db113ec1c3ffdbd35c8f7a85ad Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:16:23 +0200 Subject: [PATCH 05/19] Rename artifact jobs --- .forgejo/workflows/build-and-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 11abe09..755cf49 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -23,7 +23,7 @@ jobs: uses: https://code.forgejo.org/actions/checkout@v4 - name: Compile run: gradle build - - name: Upload artifacts + - name: Upload library JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: name: library-jars @@ -32,14 +32,14 @@ jobs: !**/build/libs/*-javadoc.jar !**/build/libs/*-source.jar if-no-files-found: error - - name: Upload artifacts + - name: Upload API documentation JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: name: apidoc-jars path: | **/build/libs/*-javadoc.jar if-no-files-found: error - - name: Upload artifacts + - name: Upload source JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: name: source-jars -- 2.45.2 From 54f582eb72d7098ed4980d5418692642058d8ce5 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:17:13 +0200 Subject: [PATCH 06/19] Revert "Change runs-on" This reverts commit 2d9dccedcaa0af4a0e3fc755c1c1afd5bfc8855f. --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 755cf49..e070e5e 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: archlinux + runs-on: docker container: image: archlinux:base-devel steps: -- 2.45.2 From 92df3037792e4e61dd8f1a8336e201e3d8f79006 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:35:55 +0200 Subject: [PATCH 07/19] Add node package for actions --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index e070e5e..1619987 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -16,7 +16,7 @@ jobs: pacman-key --init pacman-key --populate sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf - pacman -Syu --noconfirm + pacman -Syu --noconfirm node - name: Install latest OpenJDK release run: pacman -S --noconfirm jdk-openjdk - name: Checkout -- 2.45.2 From 50862c38d7ad0524e360d966e2d55f1b85a3eccd Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:37:37 +0200 Subject: [PATCH 08/19] dum --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 1619987..a9ee971 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -16,7 +16,7 @@ jobs: pacman-key --init pacman-key --populate sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf - pacman -Syu --noconfirm node + pacman -Syu --noconfirm nodejs - name: Install latest OpenJDK release run: pacman -S --noconfirm jdk-openjdk - name: Checkout -- 2.45.2 From 77fd06133489626e2b6325ffc9153afbd09c94ff Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:39:30 +0200 Subject: [PATCH 09/19] Add git package --- .forgejo/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index a9ee971..b2d2b16 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -1,4 +1,4 @@ -name: build-and-test +#name: build-and-test on: - pull_request @@ -16,7 +16,7 @@ jobs: pacman-key --init pacman-key --populate sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf - pacman -Syu --noconfirm nodejs + pacman -Syu --noconfirm nodejs git - name: Install latest OpenJDK release run: pacman -S --noconfirm jdk-openjdk - name: Checkout -- 2.45.2 From 479c71f329da5fbae2cc3af39b04fb45490a984b Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 14:41:18 +0200 Subject: [PATCH 10/19] OH SORRY it's gradlew --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index b2d2b16..b8ce6e2 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -22,7 +22,7 @@ jobs: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - name: Compile - run: gradle build + run: ./gradlew build - name: Upload library JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: -- 2.45.2 From a98cc53b41fdd32fe75e8a7e3d6bf1419d6bf1b0 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 16:50:25 +0200 Subject: [PATCH 11/19] Migrate to actions-docker --- .forgejo/workflows/build-and-test.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index b8ce6e2..ad589cb 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -8,15 +8,8 @@ jobs: build: runs-on: docker container: - image: archlinux:base-devel + image: git.staropensource.de/staropensource/actions-docker:latest steps: - - name: Setup system - run: | - set -x - pacman-key --init - pacman-key --populate - sed 's/\#ParallelDownloads = 5/ParallelDownloads = 15/g' -i /etc/pacman.conf - pacman -Syu --noconfirm nodejs git - name: Install latest OpenJDK release run: pacman -S --noconfirm jdk-openjdk - name: Checkout -- 2.45.2 From c8cf0d7437a90655dcc1aea64e1d4a8db9ef0cba Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 16:51:38 +0200 Subject: [PATCH 12/19] [no ci] Use one-time daemon --- .forgejo/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index ad589cb..6cd775a 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -1,4 +1,4 @@ -#name: build-and-test +name: build-and-test on: - pull_request @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - name: Compile - run: ./gradlew build + run: ./gradlew --no-daemon build - name: Upload library JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: -- 2.45.2 From fbbf7094c727ff2b289a62a6ce0311ef428379eb Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:01:28 +0200 Subject: [PATCH 13/19] Switch to java flavour --- .forgejo/workflows/build-and-test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 6cd775a..091e88e 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -8,10 +8,8 @@ jobs: build: runs-on: docker container: - image: git.staropensource.de/staropensource/actions-docker:latest + image: git.staropensource.de/staropensource/actions-docker:java steps: - - name: Install latest OpenJDK release - run: pacman -S --noconfirm jdk-openjdk - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - name: Compile -- 2.45.2 From 294137603febf6dedd13c088f725eb09fa7cb8ed Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:01:49 +0200 Subject: [PATCH 14/19] Add test job, update build job --- .forgejo/workflows/build-and-test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 091e88e..63e1936 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - name: Compile - run: ./gradlew --no-daemon build + run: ./gradlew --no-daemon jar javadocJar sourceJar - name: Upload library JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: @@ -37,3 +37,12 @@ jobs: path: | **/build/libs/*-source.jar 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 -- 2.45.2 From 7bc23e43f5a7f3fe8cc0595c0b5f3a43e1f4fa85 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:30:15 +0200 Subject: [PATCH 15/19] Fix library and source jar upload --- .forgejo/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 63e1936..a634c8f 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -21,7 +21,7 @@ jobs: path: | **/build/libs/*.jar !**/build/libs/*-javadoc.jar - !**/build/libs/*-source.jar + !**/build/libs/*-sources.jar if-no-files-found: error - name: Upload API documentation JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 @@ -35,7 +35,7 @@ jobs: with: name: source-jars path: | - **/build/libs/*-source.jar + **/build/libs/*-sources.jar if-no-files-found: error test: runs-on: docker -- 2.45.2 From 535a290e6f0dcb3c8cf78d8ff2f763ac05697606 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:47:55 +0200 Subject: [PATCH 16/19] Add generate-javadoc job --- .forgejo/workflows/build-and-test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index a634c8f..bec6440 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -37,6 +37,29 @@ jobs: 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: Compile + 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: -- 2.45.2 From c2e4a5c9e56aa5356575dfdc25469d7363163797 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:52:07 +0200 Subject: [PATCH 17/19] Fix javadoc-combined upload step --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index bec6440..6a7ebd5 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -58,7 +58,7 @@ jobs: with: name: javadoc-combined path: | - /build/docs/javadoc/* + build/docs/javadoc/* if-no-files-found: error test: runs-on: docker -- 2.45.2 From ccb107ee80d576e584e8e95c232e1fd3e75b47aa Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 17:55:57 +0200 Subject: [PATCH 18/19] [no ci] Rename step --- .forgejo/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 6a7ebd5..4a1c79b 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - - name: Compile + - name: Generate javadoc run: ./gradlew --no-daemon javadoc javadocAll - name: Upload separate javadoc uses: https://code.forgejo.org/forgejo/upload-artifact@v4 -- 2.45.2 From e1fd6a81af6be840d0564a05a0ea71ae3f9a9f4b Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 18 Aug 2024 18:09:45 +0200 Subject: [PATCH 19/19] Ensure consistent artifact naming scheme --- .forgejo/workflows/build-and-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-and-test.yml b/.forgejo/workflows/build-and-test.yml index 4a1c79b..a238d26 100644 --- a/.forgejo/workflows/build-and-test.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -17,7 +17,7 @@ jobs: - name: Upload library JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: - name: library-jars + name: jars-libraries path: | **/build/libs/*.jar !**/build/libs/*-javadoc.jar @@ -26,14 +26,14 @@ jobs: - name: Upload API documentation JARs uses: https://code.forgejo.org/forgejo/upload-artifact@v4 with: - name: apidoc-jars + 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: source-jars + name: jars-sources path: | **/build/libs/*-sources.jar if-no-files-found: error -- 2.45.2