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

Update to gradle/actions/setup-gradle@v3 #3364

Merged
merged 2 commits into from
Jan 30, 2024
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
9 changes: 6 additions & 3 deletions .github/workflows/githubpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: assemble
uses: gradle/gradle-build-action@v2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: -Pversion=${{ github.event.release.tag_name }} dokkaHtmlMultiModule -Pgithubpages=true
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: assemble
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} dokkaHtmlMultiModule -Pgithubpages=true

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: assemble
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: assemble -Pversion=${{ inputs.version }}
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Assemble
run: ./gradlew assemble -Pversion=${{ inputs.version }}

- name: Upload reports
if: failure()
Expand All @@ -48,6 +51,4 @@ jobs:
path: '**/build/reports/**'

- name: Publish final version
uses: gradle/gradle-build-action@v3
with:
arguments: -Pversion=${{ inputs.version }} publishToSonatype closeSonatypeStagingRepository
run: ./gradlew -Pversion=${{ inputs.version }} publishToSonatype closeSonatypeStagingRepository
200 changes: 113 additions & 87 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ concurrency:
cancel-in-progress: true

jobs:
ios_watchos:
runs-on: macos-latest

check:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
Expand All @@ -25,19 +26,22 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: ios and watchos tests
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: iosSimulatorArm64Test iosX64Test watchosSimulatorArm64Test watchosX64Test --parallel --scan
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Knit and API checks
run: ./gradlew knitCheck apiCheck --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-ios_watchos'
name: 'reports-check'
path: '**/build/reports/**'

macos_tvos:
ios_watchos:
runs-on: macos-latest
timeout-minutes: 60

Expand All @@ -52,20 +56,23 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: macos and tvos tests
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: macosArm64Test macosX64Test tvosSimulatorArm64Test tvosX64Test --parallel --scan
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: iOS and watchOS tests
run: ./gradlew iosSimulatorArm64Test iosX64Test watchosSimulatorArm64Test watchosX64Test --parallel --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-macos_tvos'
name: 'reports-ios_watchos'
path: '**/build/reports/**'

windows:
runs-on: windows-latest
update_api:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
Expand All @@ -79,19 +86,21 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: mingwX64Test
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: mingwX64Test --scan
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
- name: Update API files
run: ./gradlew apiDump

- name: Commit updated API files
uses: stefanzweifel/git-auto-commit-action@v5
with:
name: 'reports-windows'
path: '**/build/reports/**'
commit_message: Auto-update API files
file_pattern: arrow-libs/**/api/*.api

check:
spotless:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -106,20 +115,22 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: check
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: knitCheck apiCheck --scan
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
- name: Apply Spotless rules
run: ./gradlew spotlessApply

- name: Commit newly formatted files
uses: stefanzweifel/git-auto-commit-action@v5
with:
name: 'reports-check'
path: '**/build/reports/**'
commit_message: Auto-apply Spotless rules
file_pattern: arrow-libs/**/*.kt

jvmTest:
runs-on: ubuntu-latest
macos_tvos:
runs-on: macos-latest
timeout-minutes: 60

steps:
Expand All @@ -133,36 +144,23 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: jvmTest
uses: gradle/gradle-build-action@v3
with:
arguments: jvmTest --scan

- name: Create code coverage report
if: "! github.event.pull_request.head.repo.fork "
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: koverXmlReport
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Add coverage report to PR
if: "! github.event.pull_request.head.repo.fork "
id: kover
uses: mi-kas/kover-report@v1
with:
path: build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Kover Report
update-comment: true
- name: macOS and tvOS tests
run: ./gradlew macosArm64Test macosX64Test tvosSimulatorArm64Test tvosX64Test --parallel --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-jvmTest'
name: 'reports-macos_tvos'
path: '**/build/reports/**'

jvmTestK2:
runs-on: ubuntu-latest
windows:
runs-on: windows-latest
timeout-minutes: 60

steps:
Expand All @@ -176,19 +174,22 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: jvmTest (K2 enabled)
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: "jvmTest -Pkotlin_version=2.0.0-Beta2 -Pksp_version=2.0.0-Beta2-1.0.16 -Pkotlin_language_version=2.0 -Pkotlin_api_version=2.0"
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: Windows (MinGW-w64) tests
run: ./gradlew mingwX64Test --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-jvmTest'
name: 'reports-windows'
path: '**/build/reports/**'

js:
jvm:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -203,24 +204,36 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: kotlinUpgradeYarnLock
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: kotlinUpgradeYarnLock
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: JVM tests
run: ./gradlew jvmTest --scan

- name: Code coverage
if: "! github.event.pull_request.head.repo.fork "
run: ./gradlew koverXmlReport

- name: jsTest
uses: gradle/gradle-build-action@v3
- name: Add code coverage report
if: "! github.event.pull_request.head.repo.fork "
id: kover
uses: mi-kas/kover-report@v1
with:
arguments: jsTest --scan
path: build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Kover Report
update-comment: true

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-js'
name: 'reports-jvmTest'
path: '**/build/reports/**'

linux:
jvmK2:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -235,19 +248,22 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: linuxX64Test
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: linuxX64Test --scan
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: JVM (Kotlin 2.0) tests
run: ./gradlew jvmTest -Pkotlin_version=2.0.0-Beta3 -Pksp_version=2.0.0-Beta3-1.0.17 -Pkotlin_language_version=2.0 -Pkotlin_api_version=2.0

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-linux'
name: 'reports-jvmTest'
path: '**/build/reports/**'

update_api:
js:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -262,18 +278,25 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: apiDump
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: apiDump
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: "Commit new API files"
uses: stefanzweifel/git-auto-commit-action@v5
- name: Upgrade yarn.lock
run: ./gradlew kotlinUpgradeYarnLock

- name: JS tests
run: ./gradlew jsTest --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
commit_message: Update API files
file_pattern: arrow-libs/**/api/*.api
name: 'reports-js'
path: '**/build/reports/**'

spotless:
linux:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -288,14 +311,17 @@ jobs:
distribution: 'temurin'
java-version: 17

- name: spotlessApply
uses: gradle/gradle-build-action@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: spotlessApply
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}

- name: "Commit newly formatted files"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply
file_pattern: arrow-libs/**/*.kt
- name: Linux (x64) tests
run: ./gradlew linuxX64Test --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-linux'
path: '**/build/reports/**'
Loading