Skip to content

Adjust deprecation annotation for hand-held devices #70

Adjust deprecation annotation for hand-held devices

Adjust deprecation annotation for hand-held devices #70

Workflow file for this run

name: CI | compile & tests
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
branches: [ '*' ]
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
lib-build:
name: Build Carbon library module for JVM targets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Official Gradle Wrapper Validation Action
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Grant execute permission for gradlew script
run: chmod +x gradlew
- name: Build lib module
run: ./gradlew :carbon:build --stacktrace -x check
lib-build-and-test-ios:
name: Build and test Carbon library module for iOS
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Official Gradle Wrapper Validation Action
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Grant execute permission for gradlew script
run: chmod +x gradlew
- name: Set up cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest
- name: Build lib module
run: ./gradlew :carbon:build --stacktrace -x check
- name: Run tests
run: ./gradlew :carbon:iosSimulatorArm64Test
- name: Tests reporting
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/test-results/iosSimulatorArm64Test/**/*.xml'
detailed_summary: true
lib-static-analysis:
name: Static code analysis - library
runs-on: ubuntu-latest
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Run Detekt
run: ./gradlew :carbon:detekt
lib-api-verification:
name: Static code analysis - library
runs-on: ubuntu-latest
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Run API verification
run: ./gradlew :carbon:apiCheck
lib-tests-android:
name: Unit + UI tests - library - Android
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [ 23, 34 ]
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- 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: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
script: ./gradlew :carbon:connectedAndroidTest
- name: Tests reporting
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/androidTest-results/**/*.xml'
detailed_summary: true
lib-tests-desktop:
name: Unit + UI tests - library - Desktop
runs-on: ubuntu-latest
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Run tests
run: ./gradlew :carbon:desktopTest
- name: Tests reporting
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/test-results/desktopTest/**/*.xml'
detailed_summary: true
lib-tests-wasmjs:
name: Unit + UI tests - library - Desktop
runs-on: ubuntu-latest
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Run tests
run: ./gradlew :carbon:wasmJsTest
- name: Tests reporting
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/test-results/wasmJsBrowserTest/**/*.xml'
detailed_summary: true
catalog-app-build:
name: Build Catalog app
runs-on: ubuntu-latest
needs: lib-build
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: adopt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Set up Gradle cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-gradle-${{ github.run_id }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Build catalog app
run: ./gradlew :catalog:build -x check
delete-cache:
name: Delete cache
permissions: write-all
if: always()
runs-on: ubuntu-latest
needs:
- lib-static-analysis
- lib-api-verification
- lib-tests-android
- lib-tests-desktop
- lib-tests-wasmjs
- catalog-app-build
steps:
- uses: actions/checkout@v4
- name: Delete cache
run: |
gh extension install actions/gh-actions-cache
set +e
gh actions-cache delete ${{ runner.os }}-gradle-${{ github.run_id }} --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}