Skip to content
Open
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
59 changes: 59 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,65 @@ jobs:
make build-python-wheel GLEAN_BUILD_TARGET="$target" GLEAN_BUILD_EXTRA="--zig"
done

test-kotlin:
runs-on: ubuntu-latest
needs: [decide-runs]
if: needs.decide-runs.outputs.rust-changed == 'true' || needs.decide-runs.outputs.kotlin-changed == 'true'
steps:
- *checkout

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

- name: Set up JDK 17
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1
with:
accept-android-sdk-licenses: true
log-accepted-android-sdk-licenses: false

- name: Install Android NDK
run: |
sdkmanager "ndk;29.0.14206865"

- name: Restrict to Linux builds only
run: |
echo "rust.targets=linux-x86-64" > local.properties

- name: Test
run: |
export GRADLE_OPTS="-Xmx2048m"
export TARGET_CFLAGS="-DNDEBUG"
./gradlew --no-daemon :glean:testDebugUnitTest

- name: Build Android Sample App
run: |
export GRADLE_OPTS="-Xmx2048m"
export TARGET_CFLAGS="-DNDEBUG"
./gradlew :glean-sample-app:assembleAndroidTest

- name: Save test results
if: failure()
run: |
mkdir -p test-results/junit/
mkdir -p test-results/tests/
cp -a glean-core/android/build/reports/tests test-results/
find glean-core/android/build -type f -regex ".*/build/test-results/.*xml" -exec cp {} test-results/junit/ \;

- name: Upload test results
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: gradle-test-failures
path: test-results/tests

lint-yaml:
runs-on: ubuntu-latest
needs: [decide-runs]
Expand Down
Loading