Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI workflow fixes (Gradle, outdated actions) #106

Merged
merged 6 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,22 @@ jobs:
build:
strategy:
matrix:
java: [1.8, 11]
java: [8, 11, 17]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
gradle_version: # set to empty to build with most recent version of gradle
gradle_version: 7.6 # set to empty to build with most recent version of gradle
gradle_commands: publishToMavenLocal exec # default is build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
- name: Cache Gradle packages
uses: actions/cache@v2
distribution: 'zulu'
cache: 'gradle'
- uses: gradle/gradle-build-action@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Wrap with specified version
run: gradle wrapper --gradle-version=${{ env.gradle_version }}
if: ${{ env.gradle_version != '' }}
- name: Wrap without version
run: gradle wrapper
if: ${{ env.gradle_version == '' }}
gradle-version: ${{ env.gradle_version }}
- name: Run commands
run: ./gradlew ${{ env.gradle_commands }}
run: gradle ${{ env.gradle_commands }}
14 changes: 5 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,19 @@ jobs:
build:
strategy:
matrix:
java: [1.8, 11]
java: [8, 11, 17]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
maven_commands: install # default is install
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
distribution: 'zulu'
cache: 'maven'
- name: Build
run: mvn ${{ env.maven_commands }}
deploy:
Expand Down