Skip to content

Commit

Permalink
Run CI on M1 mac runners (#153)
Browse files Browse the repository at this point in the history
Unfortunately, since we have native code we still need to run tests on the slow x86 mac runners.
  • Loading branch information
ajalt authored Jan 31, 2024
1 parent 91fe21c commit d9b5a5e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 95 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,13 @@ jobs:
test:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-latest, macos-14, windows-latest, ubuntu-latest]
include:
- os: macos-latest
NATIVE_TEST_TASK: :mordant:linkDebugTestMacosArm64 :mordant:macosX64Test
- os: windows-latest
NATIVE_TEST_TASK: :mordant:mingwX64Test
- os: ubuntu-latest
NATIVE_TEST_TASK: :mordant:linuxX64Test apiCheck
EXTRA_GRADLE_ARGS: :test:graalvm:nativeTest apiCheck
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Cache Kotlin Native Compiler
uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-konan-
- uses: graalvm/setup-graalvm@v1
with:
java-version: 17
Expand All @@ -39,11 +29,9 @@ jobs:
- uses: gradle/gradle-build-action@v2
with:
arguments: |
:mordant:jvmTest
:mordant:jsTest
:test:graalvm:nativeTest
:mordant:check
:test:proguard:r8jar
${{matrix.NATIVE_TEST_TASK}}
${{matrix.EXTRA_GRADLE_ARGS}}
--stacktrace
- name: Run R8 Jar
run: java -jar test/proguard/build/libs/main-r8.jar
Expand All @@ -56,6 +44,21 @@ jobs:
with:
name: error-report
path: build-reports.zip

publish:
needs: test
runs-on: macos-14
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'ajalt/mordant' }}
steps:
- uses: actions/checkout@v3
- name: Fetch git tags
run: git fetch origin +refs/tags/*:refs/tags/*
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Deploy to sonatype
uses: gradle/gradle-build-action@v2
with:
arguments: :mordant:publish -PinferVersion=true
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
78 changes: 0 additions & 78 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit d9b5a5e

Please sign in to comment.