mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This is increasingly difficult to maintain, and has very limited benefit. Modern coprocessors with enough horsepower to run Java applications can use the Gradle or Bazel build systems instead.
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: CMake Android
|
|
|
|
on: [pull_request, push]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
SCCACHE_WEBDAV_ENDPOINT: "https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-cmake-local"
|
|
SCCACHE_WEBDAV_KEY_PREFIX: "sccache"
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-24.04
|
|
name: Android Arm64
|
|
abi: arm64-v8a
|
|
- os: ubuntu-24.04
|
|
name: Android X64
|
|
abi: "x86_64"
|
|
|
|
name: "Build - ${{ matrix.name }}"
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r27d
|
|
add-to-path: false
|
|
|
|
- name: Install sccache
|
|
uses: mozilla-actions/sccache-action@v0.0.9
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get update && sudo apt-get install -y ninja-build
|
|
|
|
- name: configure
|
|
run: cmake --preset with-sccache -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_WPILIB=OFF -DWITH_GUI=OFF -DWITH_CSCORE=OFF -DWITH_TESTS=OFF -DWITH_SIMULATION_MODULES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake -DANDROID_ABI="${{ matrix.abi }}" -DANDROID_PLATFORM=android-24
|
|
env:
|
|
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
|
|
- name: build
|
|
run: cmake --build build-cmake --parallel $(nproc)
|
|
env:
|
|
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
|
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|