Prepare 1.6.0 release #608
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle build & test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_call: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
name: macos-watchos-tvos | |
targets: watchosSimulatorArm64Test tvosSimulatorArm64Test | |
- os: macos-latest | |
name: mac-ios-macos | |
targets: iosSimulatorArm64Test macosArm64Test | |
- os: macos-latest | |
name: mac-jvm | |
targets: jvmTest | |
- os: ubuntu-latest | |
name: ubuntu | |
targets: testDebugUnitTest testReleaseUnitTest jvmTest lintKotlin | |
- os: windows-latest | |
name: windows | |
targets: jvmTest | |
runs-on: ${{ matrix.os }} | |
name: Test ${{ matrix.name }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: Set up XCode | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
# TODO: Update to latest-stable once GH installs iOS 26 simulators | |
xcode-version: '^16.4.0' | |
- name: Build and run tests with Gradle | |
run: | | |
./gradlew --scan \ | |
${{ matrix.targets }} | |
shell: bash | |
# Credit: https://github.com/gradle/actions/issues/76#issuecomment-2007584323 | |
- name: Upload reports on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: report-for-${{ matrix.name }} | |
path: | | |
**/build/reports/ | |
**/build/test-results/ |