File: ci-android-emulator-tests.yml

package info (click to toggle)
libavif 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,648 kB
  • sloc: ansic: 30,743; cpp: 14,606; xml: 1,507; sh: 1,296; java: 307; makefile: 57
file content (65 lines) | stat: -rw-r--r-- 2,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI Android Emulator Tests
on:
  push:
    branches:
      - main
    paths:
      - ".github/actions/**"
      - ".github/workflows/ci-android-emulator-tests.yml"
      - "android_jni/**"
  pull_request:
    paths:
      - ".github/actions/**"
      - ".github/workflows/ci-android-emulator-tests.yml"
      - "android_jni/**"

permissions:
  contents: read

# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
  build-and-run-android-jni-tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false

    steps:
      - name: Checkout the repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      # This is needed for faster emulators. See:
      # https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
      - name: Enable KVM group perms
        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: Download and Setup the Android NDK
        uses: nttld/setup-ndk@ed92fe6cadad69be94a966a7ee3271275e62f779 # v1.6.0
        id: setup-ndk
        with:
          # r25c is the same as 25.2.9519653.
          ndk-version: r25c
          add-to-path: false
      - uses: ./.github/actions/setup-linux
        with:
          codec-dav1d: "LOCAL"
          libyuv: "LOCAL"
          oldest-cmake: true
      - name: Setup JDK
        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
        with:
          java-version: "17"
          distribution: "temurin"
      - name: Run Instrumented Tests on the Emulator
        uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0
        with:
          working-directory: android_jni
          api-level: 31
          force-avd-creation: false
          ndk: 25.2.9519653
          arch: x86_64
          script: ./gradlew cAT