Skip to content

Commit

Permalink
ci: use java version from catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
imkiva committed Sep 26, 2023
1 parent 08d1524 commit 2117142
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ on:
merge_group:
types: [checks_requested]
jobs:
check-aya-version:
uses: aya-prover/aya-dev/.github/workflows/extract-version.yaml@main

gradle-check:
needs: [check-aya-version]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java 20
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '20'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
- uses: gradle/gradle-build-action@v2
with:
arguments: testCodeCoverageReport --no-daemon --stacktrace --warning-mode all
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,7 @@ jobs:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

check-aya-version:
runs-on: ubuntu-latest
outputs:
isSnapshot: ${{ steps.check.outputs.isSnapshot }}
steps:
- uses: actions/checkout@v3
- name: Check snapshot version
id: check
run: |
ver="$(cat ./gradle/deps.properties | grep "version.project" | cut -d'=' -f2)"
isSnapshot="$(echo "$ver" | grep -q "SNAPSHOT" && echo true || echo false)"
echo "Detected Project Version: $ver"
echo "Detected Project Version is a SNAPSHOT: $isSnapshot"
echo "::set-output name=isSnapshot::${isSnapshot}"
uses: aya-prover/aya-dev/.github/workflows/extract-version.yaml@main

publish-snapshot:
needs: [check-aya-version]
Expand All @@ -44,14 +32,14 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '20'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
- name: gradle publish
uses: gradle/gradle-build-action@v2
with:
arguments: publish --info --no-daemon --stacktrace --warning-mode all

nightly-build:
needs: [move-tag]
needs: [move-tag, check-aya-version]
runs-on: ${{ matrix.os }}
env:
nativeName: aya-prover_native_${{ matrix.platform }}${{ matrix.binaryExt }}
Expand All @@ -76,7 +64,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '20'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}

- name: Run task jlinkAyaZip
uses: gradle/gradle-build-action@v2
Expand All @@ -93,7 +81,7 @@ jobs:
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '20'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
distribution: 'graalvm-community'
components: 'native-image'
set-java-home: 'false'
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# After that, increase the version number and add "-SNAPSHOT" suffix back for next cycle.
project = "0.30-SNAPSHOT"

# Remember to update .github/workflows/{nightly-build.yml, gradle-check.yml}
# https://openjdk.org/
java = "20"

# https://github.com/JetBrains/java-annotations
annotations = "24.0.1"
kala = "0.67.0"
Expand Down

0 comments on commit 2117142

Please sign in to comment.