From 18b4def39ca7c301c85dba8bef46b1dc69f31542 Mon Sep 17 00:00:00 2001 From: clementetb Date: Thu, 27 Jun 2024 11:04:14 +0200 Subject: [PATCH] Add kotlin problem matchers (#1775) --- .github/problem-matchers/detekt.json | 17 + .github/problem-matchers/kotlin.json | 40 ++ .github/problem-matchers/ktlint.json | 17 + .github/workflows/auto-merge-branches.yml | 2 +- .github/workflows/include-check-cache.yml | 461 +++++++++--------- .github/workflows/include-deploy-release.yml | 22 +- .github/workflows/include-deploy-snapshot.yml | 6 +- .../workflows/include-integration-tests.yml | 60 +-- .github/workflows/include-static-analysis.yml | 44 +- .github/workflows/pr.yml | 284 ++++++----- .../src/main/kotlin/realm-lint.gradle.kts | 1 + 11 files changed, 521 insertions(+), 433 deletions(-) create mode 100644 .github/problem-matchers/detekt.json create mode 100644 .github/problem-matchers/kotlin.json create mode 100644 .github/problem-matchers/ktlint.json diff --git a/.github/problem-matchers/detekt.json b/.github/problem-matchers/detekt.json new file mode 100644 index 0000000000..9911b4c1a2 --- /dev/null +++ b/.github/problem-matchers/detekt.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "detekt", + "severity": "error", + "pattern": [ + { + "regexp": "(.+\\.kt):(\\d+):(\\d+):\\s(.*)", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/problem-matchers/kotlin.json b/.github/problem-matchers/kotlin.json new file mode 100644 index 0000000000..a5cdc3ab7c --- /dev/null +++ b/.github/problem-matchers/kotlin.json @@ -0,0 +1,40 @@ +{ + "problemMatcher": [ + { + "owner": "kotlin", + "severity": "error", + "pattern": [ + { + "regexp": "^e\\:\\s(?:(?:(.*):(?:\\s\\()?(\\d+)(?:(?:\\,\\s)|\\:)(\\d+))(?:\\))?\\:\\s)?(.*)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + }, + { + "owner": "kotlin-warning", + "severity": "warning", + "pattern": [ + { + "regexp": "^w\\:\\s(?:(?:(.*):(?:\\s\\()?(\\d+)(?:(?:\\,\\s)|\\:)(\\d+))(?:\\))?\\:\\s)?(.*)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + }, + { + "owner": "gradle-warning", + "severity": "warning", + "pattern": [ + { + "regexp": "^WARNING:(.*(?:\\n(?!w|e\\:|>|FAILURE|BUILD SUCCESSFUL).*)*)$", + "message": 1 + } + ] + } + ] +} diff --git a/.github/problem-matchers/ktlint.json b/.github/problem-matchers/ktlint.json new file mode 100644 index 0000000000..924000e815 --- /dev/null +++ b/.github/problem-matchers/ktlint.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "ktlint", + "severity": "error", + "pattern": [ + { + "regexp": "(.+\\.kt):(\\d+):(\\d+):\\s(.*)", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/workflows/auto-merge-branches.yml b/.github/workflows/auto-merge-branches.yml index cd16801f2e..9df6218f79 100644 --- a/.github/workflows/auto-merge-branches.yml +++ b/.github/workflows/auto-merge-branches.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Set the branch we want to merge changes into as step output. This step should list each branch name found in the `push` # trigger in the top of this file. diff --git a/.github/workflows/include-check-cache.yml b/.github/workflows/include-check-cache.yml index c7bfb275e4..98cb33a9ed 100644 --- a/.github/workflows/include-check-cache.yml +++ b/.github/workflows/include-check-cache.yml @@ -19,68 +19,54 @@ on: workflow_call: outputs: version-label: - value: ${{ jobs.check-cache.outputs.version-label }} + value: ${{ jobs.checksum.outputs.version-label }} + packages-sha: + value: ${{ jobs.checksum.outputs.packages-sha }} + benchmarks-sha: + value: ${{ jobs.checksum.outputs.benchmarks-sha }} + core-commit-sha: + value: ${{ jobs.checksum.outputs.core-commit-sha }} + packages-metadata-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-metadata-cache-hit }} + value: ${{ jobs.metadata-compiler-plugin.outputs.packages-metadata-cache-hit }} packages-jvm-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-jvm-cache-hit }} + value: ${{ jobs.jvm-all.outputs.packages-jvm-cache-hit }} packages-android-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-android-cache-hit }} + value: ${{ jobs.android.outputs.packages-android-cache-hit }} android-test-base-apk-cache-hit: - value: ${{ jobs.check-cache.outputs.android-test-base-apk-cache-hit }} + value: ${{ jobs.android-test-base.outputs.android-test-base-apk-cache-hit }} android-test-sync-apk-cache-hit: - value: ${{ jobs.check-cache.outputs.android-test-sync-apk-cache-hit }} + value: ${{ jobs.android-test-sync.outputs.android-test-sync-apk-cache-hit }} packages-macos-x64-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-macos-x64-cache-hit }} + value: ${{ jobs.macos-x64.outputs.packages-macos-x64-cache-hit }} packages-macos-arm64-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-macos-arm64-cache-hit }} + value: ${{ jobs.macos-arm.outputs.packages-macos-arm64-cache-hit }} packages-ios-x64-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-ios-x64-cache-hit }} + value: ${{ jobs.ios-x64.outputs.packages-ios-x64-cache-hit }} packages-ios-arm64-cache-hit: - value: ${{ jobs.check-cache.outputs.packages-ios-arm64-cache-hit }} + value: ${{ jobs.ios-arm.outputs.packages-ios-arm64-cache-hit }} jni-swig-stub-cache-hit: - value: ${{ jobs.check-cache.outputs.jni-swig-stub-cache-hit }} + value: ${{ jobs.jni-stub.outputs.jni-swig-stub-cache-hit }} jni-linux-lib-cache-hit: - value: ${{ jobs.check-cache.outputs.jni-linux-lib-cache-hit }} + value: ${{ jobs.jni-linux-lib.outputs.jni-linux-lib-cache-hit }} jni-macos-lib-cache-hit: - value: ${{ jobs.check-cache.outputs.jni-macos-lib-cache-hit }} + value: ${{ jobs.jni-macos-lib.outputs.jni-macos-lib-cache-hit }} jni-windows-lib-cache-hit: - value: ${{ jobs.check-cache.outputs.jni-windows-lib-cache-hit }} - packages-sha: - value: ${{ jobs.check-cache.outputs.packages-sha }} - benchmarks-sha: - value: ${{ jobs.check-cache.outputs.benchmarks-sha }} - core-commit-sha: - value: ${{ jobs.check-cache.outputs.core-commit-sha }} + value: ${{ jobs.jni-windows-lib.outputs.jni-windows-lib-cache-hit }} jobs: - check-cache: + checksum: runs-on: ubuntu-latest - name: Check cache - env: - CACHE_SKIP_SAVE: true + name: Cache SHA outputs: version-label: ${{ steps.find-library-version.outputs.label }} - packages-metadata-cache-hit: ${{ steps.kotlin-metadata-cache.outputs.cache-hit }} - packages-jvm-cache-hit: ${{ steps.jvm-cache.outputs.cache-hit }} - packages-android-cache-hit: ${{ steps.android-cache.outputs.cache-hit }} - android-test-base-apk-cache-hit: ${{ steps.android-test-base-apk.outputs.cache-hit }} - android-test-sync-apk-cache-hit: ${{ steps.android-test-sync-apk.outputs.cache-hit }} - packages-macos-x64-cache-hit: ${{ steps.macos-x64-cache.outputs.cache-hit }} - packages-macos-arm64-cache-hit: ${{ steps.macos-arm64-cache.outputs.cache-hit }} - packages-ios-x64-cache-hit: ${{ steps.ios-x64-cache.outputs.cache-hit }} - packages-ios-arm64-cache-hit: ${{ steps.ios-arm64-cache.outputs.cache-hit }} - jni-swig-stub-cache-hit: ${{ steps.jni-swig-stub-cache.outputs.cache-hit }} - jni-linux-lib-cache-hit: ${{ steps.jni-linux-lib-cache.outputs.cache-hit }} - jni-macos-lib-cache-hit: ${{ steps.jni-macos-lib-cache.outputs.cache-hit }} - jni-windows-lib-cache-hit: ${{ steps.jni-windows-lib-cache.outputs.cache-hit }} packages-sha: ${{ steps.packages-cache-key.outputs.sha }} benchmarks-sha: ${{ steps.calculate-benchmarks-cache-key.outputs.sha }} - core-commit-sha: ${{ steps.calculate-core-commmit-sha.outputs.commit }} + core-commit-sha: ${{ steps.calculate-core-versioncommmit-sha.outputs.commit }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" @@ -88,6 +74,7 @@ jobs: id: find-library-version run: | version=$(grep "const val version" buildSrc/src/main/kotlin/Config.kt | cut -d \" -f2) + echo "Label: $version" echo "label=$version" >> $GITHUB_OUTPUT # This also include changes to Realm Core as they are hashed as part of `/packages/external/core` @@ -104,349 +91,341 @@ jobs: working-directory: packages/external/core run: echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - # - # For each specific package we need to perform 3 steps: - # - # 1. Check if a cache is available and download it if it is. - # 2. If (1), store this cache as an artifact for jobs downstream to use. - # 3. Cleanup the build folder. This is required so we can download the next - # platform into a fresh cache location. It does not look possible to download - # a cache into a different location. - # - # TODO There doesn't seem to be a good way to check if a cache key exists without download it. - # https://github.com/actions/cache/issues/321 - # - # TODO Create a custom action for this until we have a work-around? - # - - # - # Kotlin Metadata and Gradle/Compiler Plugin - # + # + # Kotlin Metadata and Gradle/Compiler Plugin + # + metadata-compiler-plugin: + runs-on: ubuntu-latest + name: Metadata & Compiler plugin + needs: checksum + outputs: + packages-metadata-cache-hit: ${{ steps.kotlin-metadata-cache.outputs.cache-hit }} + steps: - name: Check Kotlin Metadata cache id: kotlin-metadata-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-metadata-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-metadata-${{ needs.checksum.outputs.packages-sha }} - name: Save Kotlin Metadata packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.kotlin-metadata-cache.outputs.cache-hit == 'true' with: - name: packages-metadata-${{ steps.find-library-version.outputs.label }} + name: packages-metadata-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded JVM cache files - id: delete-cache-metadata - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.kotlin-metadata-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo + # + # JVM (All platforms) + # + jvm-all: + runs-on: ubuntu-latest + needs: checksum + name: JVM (All platforms) + outputs: + packages-jvm-cache-hit: ${{ steps.jvm-cache.outputs.cache-hit }} - # - # JVM (All platforms) - # + steps: - name: Check JVM cache id: jvm-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-jvm-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-jvm-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save JVM packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.jvm-cache.outputs.cache-hit == 'true' with: - name: packages-jvm-${{ steps.find-library-version.outputs.label }} + name: packages-jvm-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded JVM cache files - id: delete-cache-jvm - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.jvm-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo - - # - # JNI Stub (JVM) - # + # + # JNI Stub (JVM) + # + jni-stub: + runs-on: ubuntu-latest + needs: checksum + name: JNI Stub (JVM) + outputs: + jni-swig-stub-cache-hit: ${{ steps.jni-swig-stub-cache.outputs.cache-hit }} + + steps: - name: Check JNI Swig stub cache id: jni-swig-stub-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/jni-swig-stub/build/generated/sources/jni - key: jni-swig-stubs-${{ steps.packages-cache-key.outputs.sha }} + key: jni-swig-stubs-${{ needs.checksum.outputs.packages-sha }} - name: Save JNI Stub packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.jni-swig-stub-cache.outputs.cache-hit == 'true' with: - name: jni-stub-${{ steps.find-library-version.outputs.label }} + name: jni-stub-${{ needs.checksum.outputs.version-label }} path: ./packages/jni-swig-stub/build/generated/sources/jni/* retention-days: 1 - - name: Delete downloaded JVM cache files - id: delete-cache-jni-stub - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.jni-swig-stub-cache.outputs.cache-hit == 'true' - with: - path: ./packages/jni-swig-stub/build/generated/sources/jni + # + # JNI MacOS Lib + # + jni-macos-lib: + runs-on: ubuntu-latest + needs: checksum + name: JNI MacOS Lib + outputs: + jni-macos-lib-cache-hit: ${{ steps.jni-macos-lib-cache.outputs.cache-hit }} - # - # JNI MacOS Lib - # + steps: - name: Check JNI MacOS lib cache id: jni-macos-lib-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/cinterop/build/realmMacOsBuild - key: jni-macos-lib-${{ steps.packages-cache-key.outputs.sha }} - + key: jni-macos-lib-${{ needs.checksum.outputs.packages-sha }} - name: Save JNI MacOS lib package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.jni-macos-lib-cache.outputs.cache-hit == 'true' with: - name: jni-macos-lib-${{ steps.find-library-version.outputs.label }} + name: jni-macos-lib-${{ needs.checksum.outputs.version-label }} path: ./packages/cinterop/build/realmMacOsBuild/**/* retention-days: 1 - - name: Delete downloaded JVM cache files - id: delete-cache-macos-lib - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.jni-macos-lib-cache.outputs.cache-hit == 'true' - with: - path: ./packages/cinterop/build/realmMacOsBuild + # + # JNI Linux Lib + # + jni-linux-lib: + runs-on: ubuntu-latest + needs: checksum + name: JNI Linux Lib + outputs: + jni-linux-lib-cache-hit: ${{ steps.jni-linux-lib-cache.outputs.cache-hit }} - # - # JNI Linux Lib - # + steps: - name: Check JNI Linux lib cache id: jni-linux-lib-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/cinterop/build/realmLinuxBuild - key: jni-linux-lib-${{ steps.packages-cache-key.outputs.sha }} + key: jni-linux-lib-${{ needs.checksum.outputs.packages-sha }} - name: Save JNI Linux lib package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.jni-linux-lib-cache.outputs.cache-hit == 'true' with: - name: jni-linux-lib-${{ steps.find-library-version.outputs.label }} + name: jni-linux-lib-${{ needs.checksum.outputs.version-label }} path: ./packages/cinterop/build/realmLinuxBuild/**/* retention-days: 1 - - name: Delete downloaded JVM cache files - id: delete-cache-linux-lib - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.jni-linux-lib-cache.outputs.cache-hit == 'true' + # + # JNI Windows Lib + # + jni-windows-lib: + runs-on: ubuntu-latest + needs: checksum + name: JNI Windows Lib + outputs: + jni-windows-lib-cache-hit: ${{ steps.jni-windows-lib-cache.outputs.cache-hit }} + steps: + - name: Check JNI Windows lib cache + id: jni-windows-lib-cache + uses: actions/cache@v4 with: - path: ./packages/cinterop/build/realmLinuxBuild + path: ./packages/cinterop/build/realmWindowsBuild + key: jni-windows-lib-${{ needs.checksum.outputs.packages-sha }} + enableCrossOsArchive: true + + - name: Save JNI Windows lib package + uses: actions/upload-artifact@v4 + if: always() && !cancelled() && steps.jni-windows-lib-cache.outputs.cache-hit == 'true' + with: + name: jni-windows-lib-${{ needs.checksum.outputs.version-label }} + path: ./packages/cinterop/build/realmWindowsBuild/Release/realmc.dll + retention-days: 1 + # + # Android + # + android: + runs-on: ubuntu-latest + needs: checksum + name: Android + outputs: + packages-android-cache-hit: ${{ steps.android-cache.outputs.cache-hit }} - # - # Android - # + steps: - name: Check Android cache id: android-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-android-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-android-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save Android packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.android-cache.outputs.cache-hit == 'true' with: - name: packages-android-${{ steps.find-library-version.outputs.label }} + name: packages-android-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded Android cache files - id: delete-cache-android - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.android-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo + # + # Android Base Test APK + # + android-test-base: + runs-on: ubuntu-latest + needs: checksum + name: Android Base Test APK + outputs: + android-test-base-apk-cache-hit: ${{ steps.android-test-base-apk.outputs.cache-hit }} - # - # Android Base Test APK - # + steps: - name: Check Android Base Test APK id: android-test-base-apk - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk - key: android-base-test-apk-key-${{ steps.packages-cache-key.outputs.sha }} - + key: android-base-test-apk-key-${{ needs.checksum.outputs.packages-sha }} - name: Save Android Base Test APK - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.android-test-base-apk.outputs.cache-hit == 'true' with: - name: android-base-test-apk-${{ steps.find-library-version.outputs.label }} + name: android-base-test-apk-${{ needs.checksum.outputs.version-label }} path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk retention-days: 1 - - name: Delete Android Base Test APK cache files - id: delete-cache-android-base-test-apk - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.android-test-base-apk.outputs.cache-hit == 'true' - with: - path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk + # + # Android Sync Test APK + # + android-test-sync: + runs-on: ubuntu-latest + needs: checksum + name: Android Sync Test APK + outputs: + android-test-sync-apk-cache-hit: ${{ steps.android-test-sync-apk.outputs.cache-hit }} - # - # Android Sync Test APK - # + steps: - name: Check Android Sync Test APK id: android-test-sync-apk - uses: cmelchior/cache@main + uses: actions/cache@v4 with: - key: android-sync-test-apk-key-${{ steps.packages-cache-key.outputs.sha }} + key: android-sync-test-apk-key-${{ needs.checksum.outputs.packages-sha }} path: | ./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk ./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk - name: Save Android Sync Test APK - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.android-test-sync-apk.outputs.cache-hit == 'true' with: - name: android-sync-test-apk-${{ steps.find-library-version.outputs.label }} + name: android-sync-test-apk-${{ needs.checksum.outputs.version-label }} retention-days: 1 path: | ./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk ./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk - - name: Delete Android Sync Test APK cache files - id: delete-cache-android-sync-test-apk - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.android-test-sync-apk.outputs.cache-hit == 'true' - with: - path: | - ./packages/test-sync/build/outputs/apk/androidTest/debug/test-sync-debug-androidTest.apk - ./packages/test-sync/build/outputs/apk/debug/test-sync-debug.apk + # + # MacOS arm64 + # + macos-arm: + runs-on: ubuntu-latest + needs: checksum + name: MacOS arm64 + outputs: + packages-macos-arm64-cache-hit: ${{ steps.macos-arm64-cache.outputs.cache-hit }} - # - # MacOS arm64 - # + steps: - name: Check MacOS arm64 cache id: macos-arm64-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-macos-arm64-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-macos-arm64-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save MacOS arm64 packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.macos-arm64-cache.outputs.cache-hit == 'true' with: - name: packages-macos-arm64-${{ steps.find-library-version.outputs.label }} + name: packages-macos-arm64-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded MacOS arm64 cache files - id: delete-cache-macos-arm64 - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.macos-arm64-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo + # + # MacOS x64 + # + macos-x64: + runs-on: ubuntu-latest + needs: checksum + name: MacOS x64 + outputs: + packages-macos-x64-cache-hit: ${{ steps.macos-x64-cache.outputs.cache-hit }} - # - # MacOS x64 - # + steps: - name: Check MacOS X64 cache id: macos-x64-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-macos-x64-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-macos-x64-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save MacOS x64 packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.macos-x64-cache.outputs.cache-hit == 'true' with: - name: packages-macos-x64-${{ steps.find-library-version.outputs.label }} + name: packages-macos-x64-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded MacOS x64 cache files - id: delete-cache-macos-x64 - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.macos-x64-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo - # - # iOS arm64 - # + # + # iOS arm64 + # + ios-arm: + runs-on: ubuntu-latest + needs: checksum + name: iOS arm64 + outputs: + packages-ios-arm64-cache-hit: ${{ steps.ios-arm64-cache.outputs.cache-hit }} + + steps: - name: Check iOS arm64 cache id: ios-arm64-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-ios-arm64-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-ios-arm64-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save iOS arm64 packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.ios-arm64-cache.outputs.cache-hit == 'true' with: - name: packages-ios-arm64-${{ steps.find-library-version.outputs.label }} + name: packages-ios-arm64-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - name: Delete downloaded iOS arm64 cache files - id: delete-cache-ios-arm64 - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.ios-arm64-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo + # + # iOS x64 + # + ios-x64: + runs-on: ubuntu-latest + needs: checksum + name: iOS x64 + outputs: + packages-ios-x64-cache-hit: ${{ steps.ios-x64-cache.outputs.cache-hit }} - # - # iOS x64 - # + steps: - name: Check iOS X64 cache id: ios-x64-cache - uses: cmelchior/cache@main + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo - key: packages-m2-ios-x64-sync-${{ steps.packages-cache-key.outputs.sha }} + key: packages-m2-ios-x64-sync-${{ needs.checksum.outputs.packages-sha }} - name: Save iOS x64 packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() && !cancelled() && steps.ios-x64-cache.outputs.cache-hit == 'true' with: - name: packages-ios-x64-${{ steps.find-library-version.outputs.label }} + name: packages-ios-x64-${{ needs.checksum.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - - - name: Delete downloaded iOS x64 cache files - id: delete-cache-ios-x64 - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.ios-x64-cache.outputs.cache-hit == 'true' - with: - path: ./packages/build/m2-buildrepo - - # - # JNI Windows Lib - # - - name: Check JNI Windows lib cache - id: jni-windows-lib-cache - uses: cmelchior/cache@main - with: - path: ./packages/cinterop/build/realmWindowsBuild - key: jni-windows-lib-${{ steps.packages-cache-key.outputs.sha }} - enableCrossOsArchive: true - - - name: Save JNI Windows lib package - uses: actions/upload-artifact@v3 - if: always() && !cancelled() && steps.jni-windows-lib-cache.outputs.cache-hit == 'true' - with: - name: jni-windows-lib-${{ steps.find-library-version.outputs.label }} - path: ./packages/cinterop/build/realmWindowsBuild/Release/realmc.dll - retention-days: 1 - - - name: Delete downloaded JNI Windows lib cache files - id: delete-cache-windows-lib - uses: JesseTG/rm@v1.0.3 - if: always() && !cancelled() && steps.jni-windows-lib-cache.outputs.cache-hit == 'true' - with: - path: ./packages/cinterop/build/realmWindowsBuild diff --git a/.github/workflows/include-deploy-release.yml b/.github/workflows/include-deploy-release.yml index 4dc1d2d163..7e5bd70819 100644 --- a/.github/workflows/include-deploy-release.yml +++ b/.github/workflows/include-deploy-release.yml @@ -18,33 +18,33 @@ jobs: steps: - name: git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'jvm-package' max-size: '2.0G' @@ -71,31 +71,31 @@ jobs: # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-jvm-sync-${{ inputs.packages-sha-label }} - name: Restore Linux JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-linux-lib-${{ inputs.version-label }} path: ./packages/cinterop/build/realmLinuxBuild - name: Restore Windows JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-windows-lib-${{ inputs.version-label }} path: ./packages/cinterop/build/realmWindowsBuild/Release - name: Restore MacOS JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-macos-lib-${{ inputs.version-label }} path: ./packages/cinterop/build/realmMacOsBuild - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo diff --git a/.github/workflows/include-deploy-snapshot.yml b/.github/workflows/include-deploy-snapshot.yml index d50f9abbdc..83dbf0fbd3 100644 --- a/.github/workflows/include-deploy-snapshot.yml +++ b/.github/workflows/include-deploy-snapshot.yml @@ -19,12 +19,12 @@ jobs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} @@ -35,7 +35,7 @@ jobs: version: ${{ vars.VERSION_KOTLIN_COMMANDLINE_TOOLS }} - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo diff --git a/.github/workflows/include-integration-tests.yml b/.github/workflows/include-integration-tests.yml index 6f23b27bbb..2d3349ec8e 100644 --- a/.github/workflows/include-integration-tests.yml +++ b/.github/workflows/include-integration-tests.yml @@ -19,21 +19,21 @@ jobs: # runs-on: macos-12 # steps: # - name: Checkout code - # uses: actions/checkout@v3 + # uses: actions/checkout@v4 # - name: Setup Java 11 - # uses: actions/setup-java@v3 + # uses: actions/setup-java@v4 # with: # distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} # java-version: 11 # - name: Setup Gradle and task/dependency caching - # uses: gradle/gradle-build-action@v2 + # uses: gradle/actions/setup-gradle@v3 # with: # cache-read-only: false # - name: Restore m2-buildrepo - # uses: actions/download-artifact@v3 + # uses: actions/download-artifact@v4 # with: # name: all-packages-${{ needs.check-cache.outputs.version-label }} # path: ./packages/build/m2-buildrepo @@ -60,21 +60,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo @@ -90,27 +90,27 @@ jobs: runs-on: macos-12 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo # - name: AVD cache - # uses: actions/cache@v3 + # uses: actions/cache@v4 # id: avd-cache # with: # path: | @@ -171,24 +171,24 @@ jobs: build-benchmarks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo @@ -213,30 +213,30 @@ jobs: arguments: integrationTest runs-on: macos-12 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo # - name: AVD cache - # uses: actions/cache@v3 + # uses: actions/cache@v4 # id: avd-cache # with: # path: | @@ -294,30 +294,30 @@ jobs: arguments: integrationTest runs-on: macos-12 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: 17 - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: all-packages-${{ inputs.version-label }} path: ./packages/build/m2-buildrepo # - name: AVD cache - # uses: actions/cache@v3 + # uses: actions/cache@v4 # id: avd-cache # with: # path: | diff --git a/.github/workflows/include-static-analysis.yml b/.github/workflows/include-static-analysis.yml index 4f456ecae0..e30fd81978 100644 --- a/.github/workflows/include-static-analysis.yml +++ b/.github/workflows/include-static-analysis.yml @@ -9,17 +9,21 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/ktlint.json" + - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false # TODO How to configure caching here? - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} @@ -29,9 +33,9 @@ jobs: - name: Run Ktlint run: ./gradlew ktlintCheck + continue-on-error: true - name: Stash Ktlint results - if: always() run: | rm -rf /tmp/ktlint rm -rf /tmp/detekt @@ -45,30 +49,33 @@ jobs: rsync -a --delete --ignore-errors packages/gradle-plugin/build/reports/ktlint/ /tmp/ktlint/plugin-gradle/ || true rsync -a --delete --ignore-errors benchmarks/build/reports/ktlint/ /tmp/ktlint/benchmarks/ || true - - name: Publish Ktlint results - uses: cmelchior/checkstyle-github-action@master - if: always() + - name: Publish Ktlint results + uses: actions/upload-artifact@v4 with: - name: Ktlint Results - title: Ktlint Analyzer report - path: '/tmp/ktlint/**/*.xml' + name: Ktlint Analyzer report + path: /tmp/ktlint/* + retention-days: 1 detekt: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/detekt.json" + - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false # TODO How to configure caching here? - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2 with: cmake-version: ${{ vars.VERSION_CMAKE }} @@ -78,9 +85,9 @@ jobs: - name: Run Detekt run: ./gradlew detekt + continue-on-error: true - name: Stash Detekt results - if: always() run: | rm -rf /tmp/detekt mkdir /tmp/detekt @@ -93,9 +100,8 @@ jobs: rsync -a --delete --ignore-errors benchmarks/build/reports/detekt/ /tmp/detekt/benchmarks/ || true - name: Publish Detekt results - uses: cmelchior/checkstyle-github-action@master - if: always() + uses: actions/upload-artifact@v4 with: - name: Detekt Results - title: Detekt Analyzer report - path: '/tmp/detekt/**/*.xml' + name: Detekt Analyzer report + path: /tmp/detekt/* + retention-days: 1 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf1ec975d8..98249ff7c4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -37,29 +37,33 @@ jobs: if: always() && !cancelled() && needs.check-cache.outputs.jni-swig-stub-cache-hit != 'true' steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/kotlin.json" + - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Load build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/jni-swig-stub/build/generated/sources/jni key: jni-swig-stubs-${{ needs.check-cache.outputs.packages-sha }} - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} @@ -86,7 +90,7 @@ jobs: run: ./gradlew :jni-swig-stub:assemble -Prealm.kotlin.buildRealmCore=false -Prealm.kotlin.mainHost=false - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jni-stub-${{ needs.check-cache.outputs.version-label }} path: ./packages/jni-swig-stub/build/generated/sources/jni/* @@ -104,29 +108,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/kotlin.json" + - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/cinterop/build/realmLinuxBuild key: jni-linux-lib-${{ needs.check-cache.outputs.packages-sha }} - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Restore JNI Swig Stubs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-stub-${{ needs.check-cache.outputs.version-label }} path: ./packages/jni-swig-stub/build/generated/sources/jni - name: Build Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: tags: jvm-native-lib-linux:latest file: ./packages/cinterop/src/jvmMain/generic.Dockerfile @@ -153,7 +161,7 @@ jobs: make -j8 - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jni-linux-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmLinuxBuild/librealmc.so @@ -171,7 +179,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # TODO See https://github.com/microsoft/vcpkg/issues/25349 which might describe the error here https://github.com/realm/realm-kotlin/runs/8099890473?check_suite_focus=true # -- Building for: Visual Studio 17 2022 @@ -185,19 +193,19 @@ jobs: submodules: "recursive" - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/cinterop/build/realmWindowsBuild key: jni-windows-lib-${{ needs.check-cache.outputs.packages-sha }} enableCrossOsArchive: true - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Restore JNI Swig Stubs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-stub-${{ needs.check-cache.outputs.version-label }} path: ${{ github.workspace }}/packages/jni-swig-stub/build/generated/sources/jni @@ -222,7 +230,7 @@ jobs: cmake --build . --config Release - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jni-windows-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmWindowsBuild/Release/realmc.dll @@ -240,33 +248,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'jvm-macos-native-lib' max-size: '2.0G' @@ -292,13 +300,13 @@ jobs: # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/cinterop/build/realmMacOsBuild key: jni-macos-lib-${{ needs.check-cache.outputs.packages-sha }} - name: Restore JNI Swig Stubs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-stub-${{ needs.check-cache.outputs.version-label }} path: ${{ github.workspace }}/packages/jni-swig-stub/build/generated/sources/jni @@ -307,8 +315,12 @@ jobs: working-directory: packages run: ./gradlew buildJVMSharedLibs -Prealm.kotlin.mainHost=false + - name: Show ccache size + run: | + echo `du -sh ~/.ccache` + - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jni-macos-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmMacOsBuild/librealmc.dylib @@ -328,33 +340,37 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/kotlin.json" + - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'metadata-package' max-size: '2.0G' @@ -377,7 +393,7 @@ jobs: ndk-version: r23c - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-metadata-${{ needs.check-cache.outputs.packages-sha }} @@ -387,7 +403,7 @@ jobs: run: ./gradlew publishCIPackages -Prealm.kotlin.targets=gradlePlugin,compilerPlugin -Prealm.kotlin.buildRealmCore=false -Prealm.kotlin.mainHost=true - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -410,33 +426,37 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" + - name: Register problem matchers + run: |- + echo "::add-matcher::.github/problem-matchers/kotlin.json" + - name: Setup Java 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: '17' - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'jvm-package' max-size: '2.0G' @@ -463,25 +483,25 @@ jobs: # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Setup build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-jvm-sync-${{ needs.check-cache.outputs.packages-sha }} - name: Restore Linux JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-linux-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmLinuxBuild - name: Restore Windows JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-windows-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmWindowsBuild/Release - name: Restore MacOS JNI lib - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jni-macos-lib-${{ needs.check-cache.outputs.version-label }} path: ./packages/cinterop/build/realmMacOsBuild @@ -490,8 +510,12 @@ jobs: working-directory: packages run: ./gradlew publishCIPackages -Prealm.kotlin.targets=jvm -Prealm.kotlin.buildRealmCore=false -Prealm.kotlin.copyNativeJvmLibs=linux,windows,macos -Prealm.kotlin.mainHost=false + - name: Show ccache size + run: | + echo `du -sh ~/.ccache` + - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-jvm-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -518,18 +542,18 @@ jobs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false @@ -554,17 +578,17 @@ jobs: run: brew install jq - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'android-package' max-size: '2.0G' @@ -599,20 +623,20 @@ jobs: run: ./gradlew publishCIPackages -Prealm.kotlin.targets=android -Prealm.kotlin.buildRealmCore=false -Prealm.kotlin.mainHost=false - name: Store build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-android-sync-${{ needs.check-cache.outputs.packages-sha }} - name: Store build cache for Android Test APK - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk key: android-base-test-apk-key-${{ needs.check-cache.outputs.packages-sha }} # Must match naming found in include-check-cache.yml - name: Store build cache for Android Sync Test APK - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: android-sync-test-apk-key-${{ needs.check-cache.outputs.packages-sha }} path: | @@ -622,21 +646,21 @@ jobs: # Must match naming found in include-check-cache.yml # Must match naming found in include-check-cache.yml - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-android-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* retention-days: 1 - name: Upload Android Base Test APK - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: android-base-test-apk-${{ needs.check-cache.outputs.version-label }} path: ./packages/test-base/build/outputs/apk/androidTest/debug/test-base-debug-androidTest.apk retention-days: 1 - name: Upload Android Sync Test APK - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: android-sync-test-apk-${{ needs.check-cache.outputs.version-label }} retention-days: 1 @@ -653,33 +677,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'macos-x64-package' max-size: '2.0G' @@ -702,16 +726,20 @@ jobs: working-directory: packages run: ./gradlew publishCIPackages -Prealm.kotlin.targets=macosX64 -Prealm.kotlin.mainHost=false + - name: Show ccache size + run: | + echo `du -sh ~/.ccache` + # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Store build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-macos-x64-sync-${{ needs.check-cache.outputs.packages-sha }} # Must match naming found in include-check-cache.yml - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-macos-x64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -725,33 +753,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'macos-arm64-package' max-size: '2.0G' @@ -775,14 +803,14 @@ jobs: run: ./gradlew publishCIPackages -Prealm.kotlin.targets=macosArm64 -Prealm.kotlin.mainHost=false - name: Store build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-macos-arm64-sync-${{ needs.check-cache.outputs.packages-sha }} # Must match naming found in include-check-cache.yml - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-macos-arm64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -796,33 +824,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'ios-x64-package' max-size: '2.0G' @@ -847,14 +875,14 @@ jobs: # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Store build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-ios-x64-sync-${{ needs.check-cache.outputs.packages-sha }} # Must match naming found in include-check-cache.yml - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-ios-x64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -868,33 +896,33 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 + uses: jwlawson/actions-setup-cmake@v2.0.2 with: cmake-version: ${{ vars.VERSION_CMAKE }} - name: Setup ninja - uses: cmelchior/setup-ninja@master + uses: clementetb/setup-ninja@master with: version: ${{ vars.VERSION_NINJA }} - name: Install ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2.13 with: key: 'ios-arm64-package' max-size: '2.0G' @@ -919,14 +947,14 @@ jobs: # We cannot use artifacts as they cannot be shared between workflows, so use cache instead. - name: Store build cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./packages/build/m2-buildrepo key: packages-m2-ios-arm64-sync-${{ needs.check-cache.outputs.packages-sha }} # Must match naming found in include-check-cache.yml - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-ios-arm64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo/**/* @@ -962,7 +990,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" @@ -988,30 +1016,30 @@ jobs: echo "baas_container_id=$OUTPUT" >> $GITHUB_OUTPUT - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore Kotlin metadata artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore m2-buildrepo (Android) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-android-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore m2-buildrepo (JVM) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-jvm-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo @@ -1048,7 +1076,7 @@ jobs: cd packages && ./gradlew :test-${{ matrix.type }}:connectedCheck -PsyncUsePlatformNetworking=true -PsyncTestUrl=${{ steps.baas_cli_poll.outputs.baas_container_hostname }} -PincludeSdkModules=false --info --no-daemon - name: Archive LogCat data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() || failure() with: name: logcat-${{ matrix.type }}-emulator.txt @@ -1091,16 +1119,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore Android Test APK - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: android-base-test-apk-${{ needs.check-cache.outputs.version-label }} path: ./packages/test-base/build/outputs/apk/androidTest/debug - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_DEVICEFARM_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_DEVICEFARM_SECRET_ACCESS_KEY }} @@ -1128,7 +1156,7 @@ jobs: !contains(needs.*.result, 'cancelled') steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # checkout BAAS CLI repo - name: Checkout BAAS repo @@ -1148,13 +1176,13 @@ jobs: echo "baas_container_id=$OUTPUT" >> $GITHUB_OUTPUT - name: Restore Android Sync Test APK - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: android-sync-test-apk-${{ needs.check-cache.outputs.version-label }} path: ./packages/test-sync/build/outputs/apk/ - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_DEVICEFARM_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_DEVICEFARM_SECRET_ACCESS_KEY }} @@ -1232,7 +1260,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # checkout BAAS CLI repo - name: Checkout BAAS repo @@ -1256,24 +1284,24 @@ jobs: echo "baas_container_id=$OUTPUT" >> $GITHUB_OUTPUT - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-${{ matrix.package-prefix }}-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore Kotlin metadata artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo @@ -1361,7 +1389,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # checkout BAAS CLI repo - name: Checkout BAAS repo @@ -1385,24 +1413,24 @@ jobs: echo "baas_container_id=$OUTPUT" >> $GITHUB_OUTPUT - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore m2-buildrepo (ios) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-ios-${{ matrix.package-prefix }}-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore Kotlin metadata artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo @@ -1503,7 +1531,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # checkout BAAS CLI repo - name: Checkout BAAS repo @@ -1527,24 +1555,24 @@ jobs: echo "baas_container_id=$OUTPUT" >> $GITHUB_OUTPUT - name: Setup Java 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }} java-version: ${{ vars.VERSION_JAVA }} - name: Setup Gradle and task/dependency caching - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: false - name: Restore Kotlin metadata artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore m2-buildrepo - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-jvm-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo @@ -1602,54 +1630,54 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # The Metadata artifact contain broken JVM publications, so it needs to be # restored first, it so they can be overidden with the correct ones. - name: Restore Kotlin metadata artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-metadata-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore Android artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-android-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore JVM artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-jvm-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore MacOS x64 artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-macos-x64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore MacOS arm64 artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-macos-arm64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore iOS x64 artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-ios-x64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Restore iOS arm64 artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: packages-ios-arm64-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo - name: Upload artifacts bundle - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: all-packages-${{ needs.check-cache.outputs.version-label }} path: ./packages/build/m2-buildrepo @@ -1700,7 +1728,7 @@ jobs: is_publish_build: ${{ steps.check_release.outputs.is_publish_build }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check if release build id: check_release @@ -1755,4 +1783,4 @@ jobs: secrets: inherit with: version-label: ${{ needs.check-cache.outputs.version-label }} - packages-sha-label: ${{ needs.check-cache.outputs.packages-sha }} + packages-sha-label: ${{ needs.check-cache.outputs.packages-sha }} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/realm-lint.gradle.kts b/buildSrc/src/main/kotlin/realm-lint.gradle.kts index aed516a6ac..3020dfc01a 100644 --- a/buildSrc/src/main/kotlin/realm-lint.gradle.kts +++ b/buildSrc/src/main/kotlin/realm-lint.gradle.kts @@ -66,6 +66,7 @@ allprojects { "!src/**/generated/**", "!src/**/resources/**", "--reporter=plain", + "--reporter=html,output=${project.buildDir}/reports/ktlint/ktlint.html", "--reporter=checkstyle,output=${project.buildDir}/reports/ktlint/ktlint.xml", "--editorconfig=${configDir}/ktlint/.editorconfig" )