Skip to content
Open
Show file tree
Hide file tree
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
59 changes: 54 additions & 5 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,42 @@ jobs:
version: 5.0.4
actions-cache-folder: "emsdk-cache"

# GitHub's Ubuntu images already provide the Android command-line tools.
# Avoid setup-android here: v3 targets deprecated Node 20 and currently
# fails when GitHub forces the action to run on Node 24.
- name: Android SDK / NDK 23 Setup
if: startsWith(matrix.platform, 'android-')
env:
ANDROID_NDK_VERSION: 23.2.8568313
ANDROID_COMPILE_SDK: 31
ANDROID_CMAKE_VERSION: 3.22.1
ANDROID_ABI: ${{ matrix.android_abi }}
run: |
sdkmanager_bin="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager"
if [ ! -x "$sdkmanager_bin" ]; then
sdkmanager_bin="$(command -v sdkmanager || true)"
fi
if [ -z "$sdkmanager_bin" ] || [ ! -x "$sdkmanager_bin" ]; then
echo "::error::sdkmanager was not found on the GitHub runner"
exit 1
fi

yes | "$sdkmanager_bin" --licenses > /dev/null || true
"$sdkmanager_bin" \
"platforms;android-${ANDROID_COMPILE_SDK}" \
"ndk;${ANDROID_NDK_VERSION}" \
"cmake;${ANDROID_CMAKE_VERSION}"
android_ndk_root="${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_VERSION}"
if [ ! -f "${android_ndk_root}/build/cmake/android.toolchain.cmake" ]; then
echo "::error::Android NDK toolchain was not installed at ${android_ndk_root}"
exit 1
fi
echo "ANDROID_ABI=${ANDROID_ABI}" >> "$GITHUB_ENV"
echo "ANDROID_API=21" >> "$GITHUB_ENV"
echo "ANDROID_PLATFORM=android-21" >> "$GITHUB_ENV"
echo "ANDROID_NDK_ROOT=${android_ndk_root}" >> "$GITHUB_ENV"
echo "ANDROID_NDK_HOME=${android_ndk_root}" >> "$GITHUB_ENV"

# - name: Verify emsdk
# if: matrix.platform == 'emscripten'
# run: |
Expand Down Expand Up @@ -224,12 +260,25 @@ jobs:
aarch64-linux-gnu-readelf -d **/*.a 2>/dev/null | grep -E "GLIBC|CXXABI" || true
# Should show versions like GLIBC_2.36, NOT 2.38+

- name: Rename and Publish Release
env:
# GITHUB_TOKEN: ${{ github.TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rename Build Archive
run: |
mv dist/*.zip ofLibs_${{ inputs.lib }}_${{ matrix.platform }}.zip
ls -alF *.zip
gh release upload ${{ inputs.version }} *.zip --clobber

- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
name: ofLibs-${{ inputs.lib }}-${{ matrix.platform }}
path: ${{ inputs.lib }}/ofLibs_${{ inputs.lib }}_${{ matrix.platform }}.zip
if-no-files-found: error

- name: Publish Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view "${{ inputs.version }}" > /dev/null 2>&1; then
gh release upload "${{ inputs.version }}" ofLibs_${{ inputs.lib }}_${{ matrix.platform }}.zip --clobber
else
echo "::notice::Release '${{ inputs.version }}' does not exist in this repository; archive built successfully but upload was skipped."
fi
# mv dist/${{ inputs.lib }}.zip ofLibs_${{ inputs.lib }}_${{ matrix.platform }}.zip
27 changes: 27 additions & 0 deletions .github/workflows/_build_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build ofLibs Android

on:
workflow_call:
inputs:
lib: { required: true, type: string }
version: { required: true, type: string }
linux_apt: { required: false, type: string }

permissions:
contents: write

jobs:
android:
uses: ./.github/workflows/_build.yml
with:
lib: ${{ inputs.lib }}
version: ${{ inputs.version }}
linux_apt: ${{ inputs.linux_apt }}
platforms: >-
[
{"platform":"android-arm64","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"arm64-v8a"},
{"platform":"android-armv7","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"armeabi-v7a"},
{"platform":"android-x86","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"x86"},
{"platform":"android-x86_64","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"x86_64"}
]
secrets: inherit
6 changes: 6 additions & 0 deletions .github/workflows/assimp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: assimp, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: assimp, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
15 changes: 15 additions & 0 deletions .github/workflows/brotli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: brotli

on:
push:
paths:
- .github/workflows/brotli.yml
- brotli/**

jobs:
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: brotli, version: v1.0 }
secrets: inherit
6 changes: 6 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: fmt, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: fmt, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/freetype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: freetype, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: freetype, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/glm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ jobs:
linux_apt: libx11-dev libglu1-mesa-dev libgl1-mesa-dev libwayland-dev libxkbcommon-dev xorg-dev libegl1-mesa-dev libopengl-dev libglx-dev libglvnd-dev,
}
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: glm, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: json, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: json, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/opencv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: opencv, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: opencv, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/poco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: poco, version: add, linux_apt: libssl-dev }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: poco, version: add }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
22 changes: 16 additions & 6 deletions .github/workflows/pugixml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ jobs:
contents: write

uses: ./.github/workflows/_build.yml
with: {
lib: pugixml,
version: v1.0,
# multistrap: true,
linux_apt: libx11-dev libglu1-mesa-dev libgl1-mesa-dev libwayland-dev libxkbcommon-dev xorg-dev libegl1-mesa-dev libopengl-dev libglx-dev libglvnd-dev,
}
with:
lib: pugixml
version: v1.0
platforms: >-
[
{"platform":"linux64","os":"ubuntu-22.04","toolchain":"llvm"},
{"platform":"macos","os":"macos-26","toolchain":"apple-llvm"},
{"platform":"vs","os":"windows-2022","toolchain":"vs-stable"},
{"platform":"rpi-aarch64","os":"ubuntu-22.04-arm","prefix":"aarch64-linux-gnu","toolchain":"aarch64-linux-gnu-gcc-12"},
{"platform":"emscripten","os":"ubuntu-latest","toolchain":"emscripten"},
{"platform":"android-arm64","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"arm64-v8a"},
{"platform":"android-armv7","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"armeabi-v7a"},
{"platform":"android-x86","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"x86"},
{"platform":"android-x86_64","os":"ubuntu-22.04","toolchain":"llvm","android_abi":"x86_64"}
]
linux_apt: libx11-dev libglu1-mesa-dev libgl1-mesa-dev libwayland-dev libxkbcommon-dev xorg-dev libegl1-mesa-dev libopengl-dev libglx-dev libglvnd-dev
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/tess2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: tess2, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: tess2, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/uriparser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: uriparser, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: uriparser, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/utfcpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: utfcpp, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: utfcpp, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
6 changes: 6 additions & 0 deletions .github/workflows/zlib-ng.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ jobs:
uses: ./.github/workflows/_build.yml
with: { lib: zlib-ng, version: v1.0 }
secrets: inherit
android:
permissions:
contents: write
uses: ./.github/workflows/_build_android.yml
with: { lib: zlib-ng, version: v1.0 }
secrets: inherit
# bump 2026-07-24: rebuild on windows-2022 (MSVC 14.4x) runner pin
18 changes: 18 additions & 0 deletions assimp/chalet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ targets:
- ASSIMP_BUILD_ZLIB=ON
# - JS_ONLY=ON
# - CMAKE_EXECUTABLE_SUFFIX=.js
defines[env:ANDROID_ABI]:
- CMAKE_TOOLCHAIN_FILE=${env:ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake
- CMAKE_ANDROID_ARCH_ABI=${env:ANDROID_ABI}
- ANDROID_ABI=${env:ANDROID_ABI}
- ANDROID_API=${env:ANDROID_API}
- ANDROID_PLATFORM=${env:ANDROID_PLATFORM}
- ANDROID_TOOLCHAIN=clang
- ANDROID_NDK=${env:ANDROID_NDK_ROOT}
- ANDROID_NDK_ROOT=${env:ANDROID_NDK_ROOT}
- ANDROID_STL=c++_static
- ASSIMP_ANDROID_JNIIOSYSTEM=ON
- ASSIMP_BUILD_SAMPLES=OFF
- ASSIMP_BUILD_DOCS=OFF
- ASSIMP_BUILD_STL_IMPORTER=OFF
- ENABLE_VISIBILITY=OFF
- ZLIB_ROOT=${externalBuild:zlib-ng}/ext.zlib-ng/install
- ZLIB_LIBRARY=${externalBuild:zlib-ng}/ext.zlib-ng/install/lib/libz.a
- ZLIB_INCLUDE_DIR=${externalBuild:zlib-ng}/ext.zlib-ng/install/include
defines[platform:windows]:
- ASSIMP_BUILD_ZLIB=ON
# defines[platform:!windows]:
Expand Down
15 changes: 15 additions & 0 deletions brotli/chalet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ targets:

# avoid creating pkgconfig folder
# - BROTLI_BUNDLED_MODE=ON
defines[env:ANDROID_ABI]:
- CMAKE_TOOLCHAIN_FILE=${env:ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake
- CMAKE_ANDROID_ARCH_ABI=${env:ANDROID_ABI}
- ANDROID_ABI=${env:ANDROID_ABI}
- ANDROID_API=${env:ANDROID_API}
- ANDROID_PLATFORM=${env:ANDROID_PLATFORM}
- ANDROID_TOOLCHAIN=clang
- ANDROID_NDK=${env:ANDROID_NDK_ROOT}
- ANDROID_NDK_ROOT=${env:ANDROID_NDK_ROOT}
- ANDROID_STL=c++_static
- BROTLI_DISABLE_TESTS=ON
- BROTLI_BUILD_TOOLS=OFF
- BROTLI_BUNDLED_MODE=OFF
- BUILD_TESTING=OFF
- ENABLE_VISIBILITY=OFF
defines[platform:macos]:
- CMAKE_OSX_ARCHITECTURES=x86_64;arm64
- CMAKE_OSX_DEPLOYMENT_TARGET=11.0
Expand Down
12 changes: 12 additions & 0 deletions fmt/chalet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ targets:
- CMAKE_INSTALL_PREFIX=install
- CMAKE_INSTALL_INCLUDEDIR=include
- CMAKE_INSTALL_LIBDIR=lib
defines[env:ANDROID_ABI]:
- CMAKE_TOOLCHAIN_FILE=${env:ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake
- CMAKE_ANDROID_ARCH_ABI=${env:ANDROID_ABI}
- ANDROID_ABI=${env:ANDROID_ABI}
- ANDROID_API=${env:ANDROID_API}
- ANDROID_PLATFORM=${env:ANDROID_PLATFORM}
- ANDROID_TOOLCHAIN=clang
- ANDROID_NDK=${env:ANDROID_NDK_ROOT}
- ANDROID_NDK_ROOT=${env:ANDROID_NDK_ROOT}
- ANDROID_STL=c++_static
- CMAKE_POSITION_INDEPENDENT_CODE=ON
- ENABLE_VISIBILITY=OFF
defines[platform:macos]:
- CMAKE_OSX_DEPLOYMENT_TARGET=11.0
- CMAKE_OSX_ARCHITECTURES=x86_64;arm64
Expand Down
17 changes: 17 additions & 0 deletions freetype/chalet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@ targets:
# defines[platform:!windows]:
# - ZLIB_INCLUDE_DIRS=${external:zlib}
# - ZLIB_INCLUDE_DIR=${external:zlib}
defines[env:ANDROID_ABI]:
- CMAKE_TOOLCHAIN_FILE=${env:ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake
- CMAKE_ANDROID_ARCH_ABI=${env:ANDROID_ABI}
- ANDROID_ABI=${env:ANDROID_ABI}
- ANDROID_API=${env:ANDROID_API}
- ANDROID_PLATFORM=${env:ANDROID_PLATFORM}
- ANDROID_TOOLCHAIN=clang
- ANDROID_NDK=${env:ANDROID_NDK_ROOT}
- ANDROID_NDK_ROOT=${env:ANDROID_NDK_ROOT}
- ANDROID_STL=c++_static
# Optional dependency projects are not part of this ofLibs recipe.
- FT_DISABLE_BZIP2=ON
- FT_DISABLE_HARFBUZZ=ON
- FT_DISABLE_BROTLI=ON
- FT_DISABLE_PNG=ON
- FT_DISABLE_ZLIB=ON

defines[platform:macos]:
- CMAKE_OSX_DEPLOYMENT_TARGET=11.0
- CMAKE_OSX_ARCHITECTURES=x86_64;arm64
Expand Down
Loading