Skip to content

Update kotlin monorepo to v2.1.10 #507

Update kotlin monorepo to v2.1.10

Update kotlin monorepo to v2.1.10 #507

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
file-changes:
runs-on: ubuntu-latest
outputs:
any: ${{ steps.check.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- name: Get changed files
id: check
uses: tj-actions/changed-files@v45
with:
files: |
.github/workflows/tests.yml
gradle/libs.versions.toml
gradle/kotlin-js-store/**
**/*.kt
**/*.kts
tests:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: [ file-changes ]
if: needs.file-changes.outputs.any == 'true'
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
steps:
- uses: msys2/setup-msys2@v2
if: startsWith(matrix.os, 'windows')
with:
msystem: MINGW64
update: true
- name: Disable Visual Studio
if: startsWith(matrix.os, 'windows')
run: move "C:\Program Files\Microsoft Visual Studio" "C:\Program Files\Microsoft Visual Studio2"
- name: Install libcurl
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install libcurl4-openssl-dev
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.konan
~/.gradle
%USERPROFILE%\.gradle
%USERPROFILE%\.konan
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}
- name: Test Apple Targets
if: startsWith(matrix.os, 'macos')
run: ./gradlew clean linkMacosX64 #:ktpack:macosX64Test :ktpack-cli-tests:macosX64Test
- name: Test Linux Target
if: startsWith(matrix.os, 'ubuntu')
env:
KTPACK_PATH: /home/runner/work/ktpack
run: ./gradlew clean linkLinuxX64 #:ktpack:linuxX64Test :ktpack-cli-tests:linuxX64Test
- name: Test Windows Target
if: startsWith(matrix.os, 'windows')
run: ./gradlew clean linkWindowsX64 #:ktpack:windowsX64Test :ktpack-cli-tests:windowsX64Test
- name: Publish Test Reports
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/TEST-*.xml'
- name: Archive test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports
path: '**/build/reports/tests/**'