Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ ./gradlew spotlessApply
Then dump binary API of this library that is public in sense of Kotlin visibilities and ensures that the public binary API wasn't changed in a way that make this change binary incompatible.

```bash
./gradlew apiDump
./gradlew updateKotlinAbi
```

Please correct any failures before requesting a review.
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/android.yml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
spotless:
name: Spotless check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 17
- uses: gradle/actions/setup-gradle@v6
- name: Spotless
run: ./gradlew spotlessCheck

build:
name: Build and test
# every target is built in one job, on a mac, because the apple targets cannot be built anywhere else.
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 17
- uses: gradle/actions/setup-gradle@v6
- name: Cache the Kotlin/Native toolchain
uses: actions/cache@v6
with:
path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml') }}
restore-keys: konan-${{ runner.os }}-

- name: Make Gradle executable
run: chmod +x ./gradlew

- name: Android library, demo and benchmark
run: |
./gradlew --stacktrace \
:snitcher:assemble :demo:assembleDebug :benchmark:assembleBenchmarkRelease

- name: Desktop library and demo
run: ./gradlew --stacktrace :snitcher:desktopJar :demo-desktop:assemble

- name: iOS frameworks
run: |
./gradlew --stacktrace \
:snitcher:linkDebugFrameworkIosSimulatorArm64 \
:snitcher:linkReleaseFrameworkIosArm64

- name: Binary compatibility
run: ./gradlew checkKotlinAbi

- name: Tests
run: |
./gradlew --stacktrace \
:snitcher:testAndroidHostTest \
:snitcher:desktopTest \
:snitcher:iosSimulatorArm64Test

ios_sample:
name: iOS sample
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 17
- uses: gradle/actions/setup-gradle@v6
- name: Cache the Kotlin/Native toolchain
uses: actions/cache@v6
with:
path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml') }}
restore-keys: konan-${{ runner.os }}-

- name: Install xcodegen
run: brew install xcodegen

- name: Generate the Xcode project
working-directory: demo-ios
run: xcodegen generate

- name: Build the sample
run: |
xcodebuild -project demo-ios/SnitcherDemo.xcodeproj \
-scheme SnitcherDemo \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
build
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
jobs:
publish:
name: Release build and publish
runs-on: ubuntu-latest
# the apple targets can only be built on a mac.
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v7
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ google-services.json
freeline.py
freeline/
freeline_project_description.json

# Xcode
xcuserdata/
*.xcworkspace/
DerivedData/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ensure your change is properly formatted by running:
Then dump binary API of this library that is public in sense of Kotlin visibilities and ensures that the public binary API wasn't changed in a way that make this change binary incompatible.

```gradle
./gradlew apiDump
./gradlew updateKotlinAbi
```

Please correct any failures before requesting a review.
Expand Down
Loading