-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 1.8 KB
/
Copy pathvalidateandroid.yml
File metadata and controls
46 lines (43 loc) · 1.8 KB
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
name: validate Android
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
ARCHFLAGS: --android
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
install:
if: contains(github.event.head_commit.message, 'androidbuild') || contains(github.event.pull_request.title, 'androidbuild') || github.event_name == 'workflow_dispatch'
runs-on: macos-26
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
# The runner's default ANDROID_NDK is an older LTS (r27). Use the
# latest stable NDK preinstalled on the image (r29 = clang 21).
# Modules build on r27+ too (StreamrModules.cmake floors at NDK
# clang 18) — building with the latest stable is hygiene, not a
# modules requirement.
- name: use latest stable NDK
run: |
echo "ANDROID_NDK=$ANDROID_NDK_LATEST_HOME" >> "$GITHUB_ENV"
echo "ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME" >> "$GITHUB_ENV"
echo "ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME" >> "$GITHUB_ENV"
# NB: the prebuilt dir is named darwin-x86_64 even on ARM Macs
# (universal binaries under the legacy name).
"$ANDROID_NDK_LATEST_HOME"/toolchains/llvm/prebuilt/darwin-*/bin/clang --version | head -1
shell: bash
- name: install
uses: ./.github/workflows/reusable/cached-install
# No lint step: linting is host-independent and runs on the
# validate.yml legs. On an Android tree the import-using test files
# have no compile commands (tests are not built on Android — see
# StreamrModules.cmake), so clangd produces spurious diagnostics.