Repository navigation
Mirror the README into the Pages index and refresh the Sass reference #27
Workflow file for this run
This file contains hidden or 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: Build & Test | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Least privilege: these jobs only read the repo. Without this the default token | |
| # permissions are far wider than anything here needs. | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v6 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - name: Build library | |
| run: ./gradlew :colorpicker:assemble | |
| - name: Run tests | |
| run: ./gradlew :colorpicker:allTests | |
| # Fails when public API drifts from colorpicker/api/. Without this the | |
| # binary-compatibility plugin is configured but never consulted. | |
| - name: Check the public API matches the committed dump | |
| run: ./gradlew apiCheck | |
| # The references under screenshot-tests/src/screenshotTestDebug/reference are only a | |
| # regression check if something compares against them. These render host-side, so | |
| # ubuntu-latest needs no emulator. | |
| - name: Validate the Compose preview goldens | |
| run: ./gradlew :screenshot-tests:validateDebugScreenshotTest | |
| # A failure here is a visual difference, which the log reports only as a pixel count. | |
| # The report holds the reference, the actual and the diff for each preview. | |
| - name: Upload the screenshot diff report | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: screenshot-diff-report | |
| path: screenshot-tests/build/reports/screenshotTest/ | |
| - name: Build sample APK | |
| run: ./gradlew :sample:androidApp:assembleDebug | |
| - name: Upload sample APK | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sample-apk | |
| path: sample/androidApp/build/outputs/apk/debug/*.apk | |
| build-ios: | |
| runs-on: macos-15 | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v6 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| - uses: gradle/actions/setup-gradle@v6 | |
| # macos-15 defaults to Xcode 16.4, whose iOS SDK predates UIViewLayoutRegion — a | |
| # symbol Compose Multiplatform's ui-uikit references. Kotlin/Native static caches | |
| # link whole modules rather than tree-shaking, so any iOS *test executable* fails to | |
| # link without a 26.x SDK (the static framework link survives because an archive | |
| # never resolves external symbols). The image ships several Xcodes; take the newest. | |
| - name: Select the newest installed Xcode | |
| run: | | |
| XCODE=$(ls -d /Applications/Xcode_*.app | sort -V | tail -1) | |
| echo "Using $XCODE" | |
| sudo xcode-select -s "$XCODE/Contents/Developer" | |
| xcodebuild -version | |
| - name: Build iOS framework | |
| run: ./gradlew :colorpicker:linkDebugFrameworkIosSimulatorArm64 | |
| - name: Run iOS simulator tests | |
| run: ./gradlew :colorpicker:iosSimulatorArm64Test |