Skip to content

Fix Haze sampling through graphicsLayer transforms (#1249) #2677

Fix Haze sampling through graphicsLayer transforms (#1249)

Fix Haze sampling through graphicsLayer transforms (#1249) #2677

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- main
- v1
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mac_build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: macos-26
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v6
with:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Compile Apple targets, run iOS simulator and macOS host tests, link macOS sample
run: >
./gradlew
compileKotlinIosArm64 iosSimulatorArm64Test
macosArm64Test :sample:macos:linkDebugExecutableMacosArm64
-Phaze.enableAppleTests
env:
ORG_GRADLE_PROJECT_remoteBuildCacheUrl: ${{ secrets.GRADLE_REMOTE_CACHE_URL }}
ORG_GRADLE_PROJECT_remoteBuildCacheUsername: ${{ secrets.GRADLE_REMOTE_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_remoteBuildCachePassword: ${{ secrets.GRADLE_REMOTE_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCachePush: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1') }}
- name: Upload reports
if: failure()
uses: actions/upload-artifact@v7
with:
name: mac-reports
path: |
**/build/reports/**
**/build/test-results/**
linux_build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v6
with:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Assemble and check
run: >
./gradlew check assembleDebug
-x :haze-screenshot-tests:testAndroidHostTest
-Phaze.disableAppleTargets
-Pandroidx.baselineprofile.skipgeneration
env:
ORG_GRADLE_PROJECT_remoteBuildCacheUrl: ${{ secrets.GRADLE_REMOTE_CACHE_URL }}
ORG_GRADLE_PROJECT_remoteBuildCacheUsername: ${{ secrets.GRADLE_REMOTE_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_remoteBuildCachePassword: ${{ secrets.GRADLE_REMOTE_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCachePush: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1') }}
- name: Upload reports + Roborazzi outputs
if: failure()
uses: actions/upload-artifact@v7
with:
name: linux-reports
path: |
**/build/reports/**
**/build/outputs/roborazzi/**
screenshot_tests:
name: Screenshot tests (android)
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v6
with:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Run screenshot tests
run: >
./gradlew :haze-screenshot-tests:testAndroidHostTest
-Phaze.disableAppleTargets
-Pandroidx.baselineprofile.skipgeneration
env:
ORG_GRADLE_PROJECT_remoteBuildCacheUrl: ${{ secrets.GRADLE_REMOTE_CACHE_URL }}
ORG_GRADLE_PROJECT_remoteBuildCacheUsername: ${{ secrets.GRADLE_REMOTE_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_remoteBuildCachePassword: ${{ secrets.GRADLE_REMOTE_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCachePush: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1') }}
- name: Upload reports + Roborazzi outputs
if: failure()
uses: actions/upload-artifact@v7
with:
name: haze-screenshot-android-reports
path: |
haze-screenshot-tests/build/reports/**
haze-screenshot-tests/build/outputs/roborazzi/**
emulator_tests:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v6
with:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run instrumentation tests on emulator
uses: reactivecircus/android-emulator-runner@v2
env:
ORG_GRADLE_PROJECT_remoteBuildCacheUrl: ${{ secrets.GRADLE_REMOTE_CACHE_URL }}
ORG_GRADLE_PROJECT_remoteBuildCacheUsername: ${{ secrets.GRADLE_REMOTE_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_remoteBuildCachePassword: ${{ secrets.GRADLE_REMOTE_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCachePush: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1') }}
with:
api-level: 34
target: google_apis
arch: x86_64
profile: pixel_6
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -no-boot-anim -noaudio -no-snapshot-save
script: ./gradlew connectedDebugAndroidTest connectedAndroidDeviceTest -Phaze.disableAppleTargets -Pandroidx.baselineprofile.skipgeneration
- name: Upload instrumentation reports
if: failure()
uses: actions/upload-artifact@v7
with:
name: emulator-test-reports
path: |
**/build/reports/androidTests/**
**/build/reports/tests/**
**/build/outputs/androidTest-results/**
deploy:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1'
runs-on: macos-26
needs:
- linux_build
- mac_build
- screenshot_tests
- emulator_tests
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v6
with:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Deploy to Sonatype
run: ./gradlew publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCacheUrl: ${{ secrets.GRADLE_REMOTE_CACHE_URL }}
ORG_GRADLE_PROJECT_remoteBuildCacheUsername: ${{ secrets.GRADLE_REMOTE_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_remoteBuildCachePassword: ${{ secrets.GRADLE_REMOTE_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_remoteBuildCachePush: true