mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-12 22:53:27 +00:00
Add NDK support
This commit is contained in:
65
.github/workflows/cmake-multi-platform.yml
vendored
65
.github/workflows/cmake-multi-platform.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Omath CI (Arch Linux / Windows)
|
||||
name: Omath CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -16,7 +16,7 @@ concurrency:
|
||||
##############################################################################
|
||||
jobs:
|
||||
arch-build-and-test:
|
||||
name: Arch Linux (Clang)
|
||||
name: Arch Linux (Clang) (x64-linux)
|
||||
runs-on: ubuntu-latest
|
||||
container: archlinux:latest
|
||||
env:
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
# 2) Windows – MSVC / Ninja
|
||||
##############################################################################
|
||||
windows-build-and-test:
|
||||
name: Windows (MSVC)
|
||||
name: Windows (MSVC) (x64-windows)
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
OMATH_BUILD_VIA_VCPKG: ON
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
# 3) macOS – AppleClang / Ninja
|
||||
##############################################################################
|
||||
macosx-build-and-test:
|
||||
name: macOS (AppleClang)
|
||||
name: macOS (AppleClang) (arm64-osx)
|
||||
runs-on: macOS-latest
|
||||
env:
|
||||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
# 4) FreeBSD – Clang / Ninja
|
||||
##############################################################################
|
||||
freebsd-build-and-test:
|
||||
name: FreeBSD (Clang)
|
||||
name: FreeBSD (Clang) (x64-freebsd)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository (with sub-modules)
|
||||
@@ -158,3 +158,58 @@ jobs:
|
||||
cmake --preset freebsd-release-vcpkg -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests" -DVCPKG_INSTALL_OPTIONS="--allow-unsupported"
|
||||
cmake --build cmake-build/build/freebsd-release-vcpkg --target unit_tests omath
|
||||
./out/Release/unit_tests
|
||||
|
||||
##############################################################################
|
||||
# 5) Android NDK – Clang / Ninja / arm64-android
|
||||
##############################################################################
|
||||
android-build-and-test:
|
||||
name: Android NDK (arm64-android)
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||
ANDROID_NDK_HOME: ${{ github.workspace }}/android-ndk
|
||||
steps:
|
||||
- name: Checkout repository (with sub-modules)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Android NDK
|
||||
shell: bash
|
||||
run: |
|
||||
NDK_VERSION="r28c"
|
||||
NDK_ZIP="android-ndk-${NDK_VERSION}-linux.zip"
|
||||
wget -q "https://dl.google.com/android/repository/${NDK_ZIP}"
|
||||
unzip -q "${NDK_ZIP}" -d "${{ github.workspace }}"
|
||||
mv "${{ github.workspace }}/android-ndk-${NDK_VERSION}" "$ANDROID_NDK_HOME"
|
||||
rm "${NDK_ZIP}"
|
||||
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
|
||||
echo "Android NDK installed at: ${ANDROID_NDK_HOME}"
|
||||
ls -la "${ANDROID_NDK_HOME}" | head -5
|
||||
|
||||
- name: Install basic tool-chain
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build cmake
|
||||
|
||||
- name: Set up vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
|
||||
cd "$VCPKG_ROOT"
|
||||
./bootstrap-vcpkg.sh
|
||||
|
||||
- name: Configure (cmake --preset)
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --preset android-release-vcpkg \
|
||||
-DVCPKG_INSTALL_OPTIONS="--allow-unsupported" \
|
||||
-DOMATH_BUILD_TESTS=ON \
|
||||
-DOMATH_BUILD_BENCHMARK=OFF \
|
||||
-DVCPKG_MANIFEST_FEATURES="imgui;tests"
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build cmake-build/build/android-release-vcpkg --target unit_tests omath
|
||||
|
||||
Reference in New Issue
Block a user