From 190eeda10dd1b60334757aa6f188734af093ce0b Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 13:27:47 +0200 Subject: [PATCH 01/20] Disable running CI on Windows --- .github/workflows/java-ci.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 116d47a..a98a794 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -12,11 +12,10 @@ name: build jobs: build: - name: Unit test on platforms - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ windows-latest, ubuntu-latest ] + name: Build and test on Linux + runs-on: ubuntu-latest + env: + PZ_VERSION: 41.50 steps: # Checkout repository - uses: actions/checkout@v2 From 0a269b826ac5d89c1dc11d730195be9c845655e2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:33:35 +0200 Subject: [PATCH 02/20] Bump capsid plugin version number --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index bbb2db8..79a50e5 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ import io.pzstorm.capsid.setup.VmParameter import io.pzstorm.capsid.setup.xml.LaunchRunConfig plugins { - id 'io.pzstorm.capsid' version '0.4.1' + id 'io.pzstorm.capsid' version '0.4.2' // https://docs.gradle.org/current/userguide/application_plugin.html id 'application' From 039548018da6b67365625043b5d725e214de29a2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:39:25 +0200 Subject: [PATCH 03/20] Install zomboid classes on CI --- .github/workflows/java-ci.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index a98a794..4950d5d 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -32,6 +32,15 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- + # Install Project Zomboid classes + - name: Install Zomboid classes + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: "pzstorm/zomboid" + version: "tags/v{{$ env.PZ_VERSION}}" + file: "zomboid-{{$ env.PZ_VERSION}}.jar" + target: "lib/zomboid.jar" + token: ${{ secrets.GITHUB_TOKEN }} # Assemble main classes with gradle - name: Assemble classes uses: burrunan/gradle-cache-action@v1 From 4037ba1efde1874eca921946d278da7214d170c1 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:45:07 +0200 Subject: [PATCH 04/20] Fix variable context expressions --- .github/workflows/java-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 4950d5d..c833120 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -37,8 +37,8 @@ jobs: uses: dsaltares/fetch-gh-release-asset@master with: repo: "pzstorm/zomboid" - version: "tags/v{{$ env.PZ_VERSION}}" - file: "zomboid-{{$ env.PZ_VERSION}}.jar" + version: "tags/v${{ env.PZ_VERSION}}" + file: "zomboid-${{ env.PZ_VERSION}}.jar" target: "lib/zomboid.jar" token: ${{ secrets.GITHUB_TOKEN }} # Assemble main classes with gradle From d2834a407c984ebd921096b4c14d4ef57b258e32 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:50:55 +0200 Subject: [PATCH 05/20] Change PZ_VERSION env value --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index c833120..1af014b 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -15,7 +15,7 @@ jobs: name: Build and test on Linux runs-on: ubuntu-latest env: - PZ_VERSION: 41.50 + PZ_VERSION: 41.51 steps: # Checkout repository - uses: actions/checkout@v2 From 83c85f7b49439ea7ea044210799b9288ee3d9158 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:53:35 +0200 Subject: [PATCH 06/20] Improve job step formatting --- .github/workflows/java-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 1af014b..d1f66d2 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -37,8 +37,8 @@ jobs: uses: dsaltares/fetch-gh-release-asset@master with: repo: "pzstorm/zomboid" - version: "tags/v${{ env.PZ_VERSION}}" - file: "zomboid-${{ env.PZ_VERSION}}.jar" + version: "tags/v${{ env.PZ_VERSION }}" + file: "zomboid-${{ env.PZ_VERSION }}.jar" target: "lib/zomboid.jar" token: ${{ secrets.GITHUB_TOKEN }} # Assemble main classes with gradle From 8432ed79da2ac470e8f2f3263bd40f5d5e6f36f3 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 17:54:02 +0200 Subject: [PATCH 07/20] Close version env in quotations --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index d1f66d2..8a10a98 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -15,7 +15,7 @@ jobs: name: Build and test on Linux runs-on: ubuntu-latest env: - PZ_VERSION: 41.51 + PZ_VERSION: "41.50" steps: # Checkout repository - uses: actions/checkout@v2 From b1062b352a75718b0a4655e382220e87dd5f0170 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 18:09:48 +0200 Subject: [PATCH 08/20] Use latest release version --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 8a10a98..d4e27af 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -37,7 +37,7 @@ jobs: uses: dsaltares/fetch-gh-release-asset@master with: repo: "pzstorm/zomboid" - version: "tags/v${{ env.PZ_VERSION }}" + version: "latest" file: "zomboid-${{ env.PZ_VERSION }}.jar" target: "lib/zomboid.jar" token: ${{ secrets.GITHUB_TOKEN }} From 60c8de09d1ecc4b6e899483f049a1c0d9efc102a Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 18:19:56 +0200 Subject: [PATCH 09/20] Use sample fetch action --- .github/workflows/java-ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index d4e27af..dc5c367 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -36,10 +36,10 @@ jobs: - name: Install Zomboid classes uses: dsaltares/fetch-gh-release-asset@master with: - repo: "pzstorm/zomboid" - version: "latest" - file: "zomboid-${{ env.PZ_VERSION }}.jar" - target: "lib/zomboid.jar" + repo: "dsaltares/godot-wild-jam-18" + version: "tags/v0.1.18" + file: "plague-linux.zip" + target: "subdir/plague-linux.zip" token: ${{ secrets.GITHUB_TOKEN }} # Assemble main classes with gradle - name: Assemble classes From c9e714bcbec8701ce769680f8b4cbaeb807a2bcc Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 18:23:17 +0200 Subject: [PATCH 10/20] Use static fetch definitions --- .github/workflows/java-ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index dc5c367..aed5b51 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -36,10 +36,10 @@ jobs: - name: Install Zomboid classes uses: dsaltares/fetch-gh-release-asset@master with: - repo: "dsaltares/godot-wild-jam-18" - version: "tags/v0.1.18" - file: "plague-linux.zip" - target: "subdir/plague-linux.zip" + repo: "pzstorm/zomboid" + version: "tags/v41.50" + file: "zomboid-41.50.jar" + target: "lib/zomboid-41.50.jar" token: ${{ secrets.GITHUB_TOKEN }} # Assemble main classes with gradle - name: Assemble classes From a16c43bc58a858f50006ef03d6d9e0da1de27f07 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 18:47:56 +0200 Subject: [PATCH 11/20] Declare specific action version --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index aed5b51..7ffb941 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -34,7 +34,7 @@ jobs: ${{ runner.os }}-gradle- # Install Project Zomboid classes - name: Install Zomboid classes - uses: dsaltares/fetch-gh-release-asset@master + uses: dsaltares/fetch-gh-release-asset@0.06 with: repo: "pzstorm/zomboid" version: "tags/v41.50" From 35ea0d823163578562410c21ab12937491d58991 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 18:53:05 +0200 Subject: [PATCH 12/20] Change fetch action token used --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 7ffb941..d7ebda9 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -40,7 +40,7 @@ jobs: version: "tags/v41.50" file: "zomboid-41.50.jar" target: "lib/zomboid-41.50.jar" - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Assemble main classes with gradle - name: Assemble classes uses: burrunan/gradle-cache-action@v1 From ea7eea800e49d899486a1fbd76e8c08a06fa4b27 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:04:16 +0200 Subject: [PATCH 13/20] Apply workflow directory permissions --- .github/workflows/java-ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index d7ebda9..aef1789 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -41,6 +41,9 @@ jobs: file: "zomboid-41.50.jar" target: "lib/zomboid-41.50.jar" token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + # Apply correct permissions for lib directory + - name: Apply directory permissions + run: chmod a+rwx ./lib # Assemble main classes with gradle - name: Assemble classes uses: burrunan/gradle-cache-action@v1 From cf606600d2dd50422b332016e19b9062c0acd201 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:09:50 +0200 Subject: [PATCH 14/20] Run workflow command with sudo --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index aef1789..5c26635 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -43,7 +43,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Apply correct permissions for lib directory - name: Apply directory permissions - run: chmod a+rwx ./lib + run: sudo chmod a+rwx ./lib # Assemble main classes with gradle - name: Assemble classes uses: burrunan/gradle-cache-action@v1 From fb3fd56330d41f90c9ebaba24f22e41a01215e5a Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:30:53 +0200 Subject: [PATCH 15/20] Use workflow env variable substitution --- .github/workflows/java-ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index 5c26635..f66b110 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -37,9 +37,9 @@ jobs: uses: dsaltares/fetch-gh-release-asset@0.06 with: repo: "pzstorm/zomboid" - version: "tags/v41.50" - file: "zomboid-41.50.jar" - target: "lib/zomboid-41.50.jar" + version: "tags/v${{ env.PZ_VERSION }}" + file: "zomboid-${{ env.PZ_VERSION }}.jar" + target: "lib/zomboid-${{ env.PZ_VERSION }}.jar" token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Apply correct permissions for lib directory - name: Apply directory permissions From 47e11e5b833c142080eff2759fcf306d5035adf9 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:32:57 +0200 Subject: [PATCH 16/20] Revert "Declare specific action version" This reverts commit e97623a3d39ae8a8fb4f6817ada9e37bf2236bbe. --- .github/workflows/java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index f66b110..b10f940 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -34,7 +34,7 @@ jobs: ${{ runner.os }}-gradle- # Install Project Zomboid classes - name: Install Zomboid classes - uses: dsaltares/fetch-gh-release-asset@0.06 + uses: dsaltares/fetch-gh-release-asset@master with: repo: "pzstorm/zomboid" version: "tags/v${{ env.PZ_VERSION }}" From 71c47c274646a4d610e8ca07ef0e386fcc70a7c7 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:41:32 +0200 Subject: [PATCH 17/20] Start caching zomboid classes --- .github/workflows/java-ci.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index b10f940..f40a421 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -32,8 +32,16 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- + # Cache Project Zomboid classes + - name: Cache Zomboid classes + id: pz-cache + uses: actions/cache@v2 + with: + path: ./lib/zomboid.jar + key: ${{ env.PZ_VERSION }} # Install Project Zomboid classes - name: Install Zomboid classes + if: steps.pz-cache.outputs.cache-hit != 'true' uses: dsaltares/fetch-gh-release-asset@master with: repo: "pzstorm/zomboid" From 77e52c935dd8abddb9b140d60a8f5ae81050c135 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 19:54:21 +0200 Subject: [PATCH 18/20] Fix caching classes not working --- .github/workflows/java-ci.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index f40a421..b36d9fa 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -33,12 +33,12 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- # Cache Project Zomboid classes - - name: Cache Zomboid classes + - name: Read Zomboid classes cache id: pz-cache uses: actions/cache@v2 with: path: ./lib/zomboid.jar - key: ${{ env.PZ_VERSION }} + key: PZ-${{ env.PZ_VERSION }} # Install Project Zomboid classes - name: Install Zomboid classes if: steps.pz-cache.outputs.cache-hit != 'true' @@ -49,6 +49,13 @@ jobs: file: "zomboid-${{ env.PZ_VERSION }}.jar" target: "lib/zomboid-${{ env.PZ_VERSION }}.jar" token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + # Cache Project Zomboid classes + - name: Cache Zomboid classes + if: steps.pz-cache.outputs.cache-hit != 'true' + uses: actions/cache@v2 + with: + path: ./lib/zomboid.jar + key: PZ-${{ env.PZ_VERSION }} # Apply correct permissions for lib directory - name: Apply directory permissions run: sudo chmod a+rwx ./lib From cc56c8d78af6ae8e958ae9ecb9a9e40c8df414d2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 20:39:40 +0200 Subject: [PATCH 19/20] Start using workflow cache versions --- .github/workflows/java-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index b36d9fa..a5a7985 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/cache@v2 with: path: ./lib/zomboid.jar - key: PZ-${{ env.PZ_VERSION }} + key: PZ-${{ env.PZ_VERSION }}-${{ secrets.CACHE_VERSION }} # Install Project Zomboid classes - name: Install Zomboid classes if: steps.pz-cache.outputs.cache-hit != 'true' @@ -55,7 +55,7 @@ jobs: uses: actions/cache@v2 with: path: ./lib/zomboid.jar - key: PZ-${{ env.PZ_VERSION }} + key: PZ-${{ env.PZ_VERSION }}-${{ secrets.CACHE_VERSION }} # Apply correct permissions for lib directory - name: Apply directory permissions run: sudo chmod a+rwx ./lib From 33c2750212b41171580cfc1236d85b0519780a84 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 6 Jun 2021 20:46:30 +0200 Subject: [PATCH 20/20] Start caching whole lib directory --- .github/workflows/java-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yaml b/.github/workflows/java-ci.yaml index a5a7985..44ab601 100644 --- a/.github/workflows/java-ci.yaml +++ b/.github/workflows/java-ci.yaml @@ -37,7 +37,7 @@ jobs: id: pz-cache uses: actions/cache@v2 with: - path: ./lib/zomboid.jar + path: ./lib/ key: PZ-${{ env.PZ_VERSION }}-${{ secrets.CACHE_VERSION }} # Install Project Zomboid classes - name: Install Zomboid classes @@ -54,7 +54,7 @@ jobs: if: steps.pz-cache.outputs.cache-hit != 'true' uses: actions/cache@v2 with: - path: ./lib/zomboid.jar + path: ./lib/ key: PZ-${{ env.PZ_VERSION }}-${{ secrets.CACHE_VERSION }} # Apply correct permissions for lib directory - name: Apply directory permissions