Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: android-build

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true

jobs:
check-android:
name: 'check android ${{ matrix.arch }}'
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
matrix:
arch: [aarch64, x86_64]
fail-fast: false

steps:
- name: Configure git
run: |
git config --global core.symlinks true
git config --global fetch.parallel 32

- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: false

- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std

- name: Cache Cargo home
uses: cirruslabs/cache@v4
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: 'cargo-home-android-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: 'cargo-home-android-${{ matrix.arch }}-'

- uses: dsherret/rust-toolchain-file@v1

- name: Add Android targets
run: |
rustup target add ${{ matrix.arch }}-linux-android

- name: Check Android compilation
run: |
echo "Checking if Deno code compiles for Android ${{ matrix.arch }}..."
echo "This validates API compatibility and catches platform-specific issues."
echo ""

# Use cargo check which validates compilation without building binaries
# This is much faster than a full build and doesn't require building V8
cargo check --target ${{ matrix.arch }}-linux-android --locked --all-targets

- name: Report results
if: success()
run: |
echo "✅ Success! Deno compiles for Android ${{ matrix.arch }}"
echo ""
echo "This check validates that:"
echo " - All Rust code is compatible with Android"
echo " - No Linux-specific APIs are used incorrectly"
echo " - Dependencies support Android targets"
echo ""
echo "Note: Full Android builds with V8 require additional infrastructure."
echo "See: https://github.com/termux/termux-packages/tree/master/packages/deno"
Loading