Skip to content

Commit

Permalink
iOS build #639
Browse files Browse the repository at this point in the history
  • Loading branch information
thoutbeckers committed Jan 31, 2023
1 parent 835d863 commit afe4180
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#### for keeping up to date with settings.gradle.kts see instructions in `test:` job
name: iOS tests
on: [pull_request, push]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=\"-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false\" -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx8G,-XX:MaxMetaspaceSize=512m,-Dorg.gradle.daemon=false,-Dkotlin.incremental=false"
JAVA_OPTS: "-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
build:
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v3

# remove VM settings as defined for using the IDE
- run: sed -i '' -e '/org.gradle.jvmargs/d' gradle.properties; cat gradle.properties

- name : set up JDK 11
uses : actions/setup-java@v3
with :
distribution : 'temurin'
java-version : 11

- name: Gradle cache
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
gradle-home-cache-includes: |
caches
notifications
configuration-cache
- name: Konan cache
uses: actions/cache@v3
id: konan-cache
with:
path: ~/.konan/*
key: konan

- run: ./gradlew mainModules

- name: load projects for build matrix
uses: cardinalby/export-env-action@v2
id: envFile
with:
envFile: 'ci_projects.env'
export: 'false'

- name: Make cache of workspace
uses: actions/cache@v3
id: restore-build
with:
path: |
./*
!/.gradle
key: build-${{ github.sha }}

# - run: ./gradlew --parallel compileKotlinIosX64

test:
needs: build
runs-on: macos-12
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.build.steps.envFile.outputs.MODULES) }}
steps:
- name: Gradle cache
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-includes: |
caches
notifications
configuration-cache
- name: Get cache of workspace
uses: actions/cache@v3
id: restore-build
with:
path: |
./*
!/.gradle
key: build-${{ github.sha }}

- name: set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11

- name: Konan cache
uses: actions/cache@v3
id: konan-cache
with:
path: ~/.konan/*
key: konan

- name: run tests
run: ./gradlew --parallel :${{ matrix.module }}:iosX64Test

0 comments on commit afe4180

Please sign in to comment.