Skip to content

Commit

Permalink
Merge pull request #81 from thecatcore/feature/update-github-workflows
Browse files Browse the repository at this point in the history
Update GitHub workflows
  • Loading branch information
wagyourtail authored Jul 27, 2024
2 parents 22f35f4 + 89f9e5b commit 6d68ad0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: '17'

- name: Grant execute permission for gradlew
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Publish
run: ./gradlew publish -Pmvn.user=${{ secrets.MAVEN_USER }} -Pmvn.key=${{ secrets.MAVEN_TOKEN }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Unimined Artifacts
path: ./build/libs/
6 changes: 3 additions & 3 deletions .github/workflows/build_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Publish
run: ./gradlew publish -Pversion_snapshot -Pmvn.user=${{ secrets.MAVEN_USER }} -Pmvn.key=${{ secrets.MAVEN_TOKEN }} -x test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Unimined Snapshot Artifacts
path: ./build/libs/
32 changes: 11 additions & 21 deletions .github/workflows/test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,23 @@ jobs:
fail-fast: false
matrix:
gradle: [
8.4,
8.7, # version used by buildscript
8.8, # version used by buildscript
8 # latest
]
java: [
8, # Old LTS
11, # Should we even test this one?
17, # LTS
21 # Latest LTS only supported by gradle 8.5+
8 #, # Old LTS we build against
# 11, # Should we even test this one?
# 17, # LTS
# 21 # Latest LTS only supported by gradle 8.5+
]
exclude:
- gradle: 8.1
java: 21
- gradle: 8.4
java: 21
runs-on: ubuntu-22.04
container:
image: gradle:${{ matrix.gradle }}-jdk${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
# Update when https://github.com/gradle/gradle/issues/25609 is fixed
- if: ${{ matrix.gradle == '8.1' && matrix.java == 17 }}
run: gradle build check -x test --stacktrace --warning-mode fail
- if: ${{ matrix.gradle != '8.1' || matrix.java != 17 }}
run: gradle build check -x test --stacktrace
- uses: gradle/actions/wrapper-validation@v3
- run: gradle build check -x test --stacktrace --warning-mode fail

# This job is used to feed the test matrix of next job to allow the tests to run in parallel
prepare_test_matrix:
Expand All @@ -46,7 +36,7 @@ jobs:

runs-on: ubuntu-22.04
container:
image: gradle:8.4.0-jdk17
image: gradle:8.8-jdk17
options: --user root

steps:
Expand All @@ -65,12 +55,12 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [17]
java: [8]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}

runs-on: ubuntu-22.04
container:
image: gradle:8.7-jdk${{ matrix.java }}
image: gradle:8.8-jdk${{ matrix.java }}
options: --user root

steps:
Expand All @@ -97,7 +87,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [21]
java: [8]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}

runs-on: windows-2022
Expand Down

0 comments on commit 6d68ad0

Please sign in to comment.