Skip to content

Merge pull request #316 from cowboydaniel/codex/fix-clangd-runtime-ve… #71

Merge pull request #316 from cowboydaniel/codex/fix-clangd-runtime-ve…

Merge pull request #316 from cowboydaniel/codex/fix-clangd-runtime-ve… #71

Workflow file for this run

name: Android APK
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build debug APK
runs-on: ubuntu-latest
env:
ANDROID_SDK_ROOT: ${{ github.workspace }}/.android-sdk
ANDROID_HOME: ${{ github.workspace }}/.android-sdk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build tooling
run: sudo apt-get update && sudo apt-get install -y ninja-build
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Checkout LLVM sources
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
path: llvm-project
ref: llvmorg-17.0.6
- name: Prepare Android SDK directory
run: mkdir -p "$ANDROID_SDK_ROOT"
- name: Cache Android SDK
uses: actions/cache@v4
with:
path: ${{ env.ANDROID_SDK_ROOT }}
key: ${{ runner.os }}-android-sdk-34-ndk26b-${{ hashFiles('android/BUILD_ANDROID.md') }}
- name: Set up Android SDK/NDK
uses: android-actions/setup-android@v3
with:
# Pinning the command line tools version avoids the malformed
# "commandlinetools-linux-latest_latest.zip" URL that can occur when
# specifying "latest". 11076708 corresponds to r11.
cmdline-tools-version: 11076708
packages: >-
platform-tools
platforms;android-34
build-tools;34.0.0
ndk;26.1.10909125
- name: Accept Android SDK licenses
run: yes | sdkmanager --licenses
- name: Assemble debug APK
working-directory: android/android-studio
env:
ANDROID_NDK_HOME: ${{ env.ANDROID_SDK_ROOT }}/ndk/26.1.10909125
run: ../runtime/clangd/build-clangd-android.sh && ./gradlew --no-daemon assembleDebug
- name: Upload debug APK artifact
uses: actions/upload-artifact@v4
with:
name: android-debug-apk
path: android/android-studio/app/build/outputs/apk/debug/*.apk
if-no-files-found: error
# Release signing guidance:
# - Define secrets for the keystore (e.g., ANDROID_KEYSTORE_BASE64) and credentials
# (ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_ALIAS_PASSWORD).
# - Decode the base64 keystore to a file before running assembleRelease and
# wire the paths into the Gradle signingConfigs section.
# - These secrets are not required for debug builds.