mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
build: add Android build target for libghostty-vt
This commit is contained in:
50
.github/workflows/test.yml
vendored
50
.github/workflows/test.yml
vendored
@@ -88,6 +88,7 @@ jobs:
|
||||
- build-examples
|
||||
- build-flatpak
|
||||
- build-libghostty-vt
|
||||
- build-libghostty-vt-android
|
||||
- build-libghostty-vt-macos
|
||||
- build-linux
|
||||
- build-linux-libghostty
|
||||
@@ -350,6 +351,55 @@ jobs:
|
||||
nix develop -c zig build lib-vt \
|
||||
-Dtarget=${{ matrix.target }}
|
||||
|
||||
# lib-vt requires the Android NDK for Android builds
|
||||
build-libghostty-vt-android:
|
||||
strategy:
|
||||
matrix:
|
||||
target: [aarch64-linux-android, x86_64-linux-android, arm-linux-androideabi]
|
||||
runs-on: namespace-profile-ghostty-sm
|
||||
needs: test
|
||||
env:
|
||||
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
|
||||
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
|
||||
ANDROID_NDK_VERSION: r29
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup Cache
|
||||
uses: namespacelabs/nscloud-cache-action@4d61c33d0b4333a518e975a0c4de7633d28713bb # v1.4.1
|
||||
with:
|
||||
path: |
|
||||
/nix
|
||||
/zig
|
||||
/opt/android-ndk
|
||||
|
||||
# Install Nix and use that to run our tests so our environment matches exactly.
|
||||
- uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16
|
||||
with:
|
||||
name: ghostty
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Setup Android NDK
|
||||
run: |
|
||||
NDK_ROOT="$HOME/Android/ndk"
|
||||
NDK_DIR = "$NDK_DIR/android-ndk-${{ env.ANDROID_NDK_VERSION }}"
|
||||
if [ ! -d "$NDK_DIR" ]; then
|
||||
curl -fsSL -o /tmp/ndk.zip "https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
|
||||
mkdir -p $NDK_DIR
|
||||
unzip -q /tmp/ndk.zip -d $NDK_DIR
|
||||
rm /tmp/ndk.zip
|
||||
fi
|
||||
echo "ANDROID_NDK_HOME=$NDK_DIR" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
nix develop -c zig build lib-vt \
|
||||
-Dtarget=${{ matrix.target }}
|
||||
|
||||
build-linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
Reference in New Issue
Block a user