(Kotlin + Gradle + Plugin) updates #146
This file contains 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: "Integration Test Local Branch Ok" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
- "website/**" | |
pull_request: | |
paths-ignore: | |
- "**/*.md" | |
- "website/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
concurrency: "integration-test-local-branch-ok" | |
runs-on: macos-12 | |
env: | |
GITHUB_PUBLISH_USER: "Touchlab-Bot" | |
TEST_URL: "KmmBridgeIntegrationTest" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "adopt" | |
java-version: "17" | |
- name: "Checkout sample" | |
uses: actions/checkout@v3 | |
with: | |
repository: "touchlab/${{ env.TEST_URL }}" | |
ref: main | |
path: "build/${{ env.TEST_URL }}" | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
with: | |
min-wrapper-count: 2 # Validating both the local wrapper and the one in the cloned sample | |
- name: Cache build tooling | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.konan | |
key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }} | |
# TODO can we cache this so it only runs once instead of running for every test case? | |
- name: Local publish plugin | |
run: | | |
./gradlew publishToMavenLocal -PRELEASE_SIGNING_ENABLED=false -PVERSION_NAME=999 | |
- name: Run local dev flow | |
run: | | |
cd build/${{ env.TEST_URL }} | |
git checkout -b mylocalbranch | |
./gradlew spmDevBuild -PspmBuildTargets=ios_x64 --info --no-daemon --stacktrace | |
env: | |
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" |