|
|
||
|---|---|---|
| README.md | ||
crueter-ci spec
This repository outlines the specifications and common information for CI repositories in this organization.
What?
These CI repositories provide prebuilt, preconfigured binaries and header files for common libraries. The purpose of this is primarily to reduce build time on projects, as they can use prebuilt packages rather than building it every single time.
Platforms
Every build should support:
- FreeBSD, OpenBSD, illumos (amd64)
- Linux (aarch64, amd64)
- Windows MSVC (aarch64, amd64)
- Windows MinGW (aarch64, amd64)
- Android (aarch64, x86_64)
Some projects may not support specific platforms. See their READMEs for more.
Usage
Supported platforms:
- FreeBSD, OpenBSD, illumos (amd64)
- Linux (aarch64, amd64)
- Windows MSVC (aarch64, amd64)
- Windows MinGW (aarch64, amd64)
- Android (aarch64, x86_64)
You can add the packages through FetchContent:
if (ANDROID)
FetchContent_Declare(
FFmpeg
DOWNLOAD_EXTRACT_TIMESTAMP true
URL https://github.com/crueter-ci/FFmpeg/releases/download/v8.0-ddf443f1e9/ffmpeg-android-aarch64-8.0-ddf443f1e9.tar.zst
)
FetchContent_MakeAvailable(FFmpeg)
endif()
...CPM:
if (MSVC)
CPMAddPackage(
NAME FFmpeg
URL https://github.com/crueter-ci/FFmpeg/releases/download/v8.0/ffmpeg-windows-8.0.tar.zst
)
endif()
...or CPMUtil for full platform management:
cpmfile.json:
{
"ffmpeg-ci": {
"ci": true,
"package": "FFmpeg",
"name": "ffmpeg",
"repo": "crueter-ci/FFmpeg",
"version": "8.0-ddf443f1e9",
"min_version": "4.1"
}
}
include(CPMUtil)
AddJsonPackage(ffmpeg-ci)
Downloads containing the file's sums are included in each release and can be fetched programmatically (CPMUtil does this for you). You can choose between static or shared linking via BUILD_SHARED_LIBS, but static linking is always recommended. Some projects (notably FFmpeg) do not support shared libraries.
Building
Everything is handled by the common build script, tools/build.sh. A POSIX-like environment is required. Input environment variables:
ARCH: arch to build for (defaultuniversalon macOS,amd64on other desktops,aarch64on Android)- Android uses
x86_64instead ofamd64 - Windows and MinGW use
arm64instead ofaarch64 - macOS always builds universal binaries
- Android uses
PLATFORM: platform to build for. One of:linuxsolarisopenbsdfreebsdmingwwindowsandroidmacos
MACOSX_DEPLOYMENT_TARGET(macOS only, default 11): minimum MacOS version to targetANDROID_NDK_ROOT(required on Android): path to an installed Android NDKANDROID_API(Android only, default 23): minimum Android SDK to target
Outputs (libraries, headers, etc.) are in out. zstd-compressed tarball artifact and sum files are in artifacts.
e.g:
Android:
export ANDROID_NDK_ROOT=/data/Android/Sdk/ndk/28.2.13676358
PLATFORM=android ARCH=x86_64 ANDROID_API=16 ./tools/build.sh
OpenBSD:
PLATFORM=openbsd ARCH=amd64 ./tools/build.sh
The "spec"
Artifact names must follow the format:
<projectname>-<platform>-<arch>-<version>
From there, each artifact must be in a tarball (preferably zstd), and must provide sha1, sha256, and sha512 sums. The arch must be one of:
x86_64for Android x86_64amd64for desktop x86_64/amd64aarch64for Android arm64-v8a and ARM UNIXes (Linux, *BSD, etc)arm64for MinGW/Windows on ARMriscv64for riscv64ppc64for PowerPC64 (little-endian only)universalfor macOS
Other architectures are entirely unsupported, namely mips64 (RIP), ppc64be (big-endian), s390x, and ALL 32-bit arches.