Skip to content
Merged
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
60 changes: 26 additions & 34 deletions .github/workflows/build-natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build native dependencies (FreeType)

# Change target FreeType version based on https://github.com/freetype/freetype/tags.
env:
FREETYPE_VERSION: VER-2-13-0 # Make sure this matches the version mentioned in the description in the .nuspec file.
FREETYPE_VERSION: VER-2-14-1 # Make sure this matches the version mentioned in the description in the .nuspec file.

on:
pull_request:
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:

macos:
name: macOS (x64 + arm64)
runs-on: macos-12
runs-on: macos-13
steps:
- name: Setup Dependencies
run: |
Expand All @@ -73,27 +73,30 @@ jobs:
name: Natives-MacOS
path: ./artifacts

# Note: Running inside a CentOS container because we want to compile using a version of glibc
# Note: Running inside a Rocky Linux container because we want to compile using a version of glibc
# that is as old as reasonably possible to ensure backwards compatibility of the compiled binaries.
linux-x64:
name: Linux (x64)
runs-on: ubuntu-22.04
container: centos:centos7
container: rockylinux:8
steps:
- name: Setup Dependencies
run: |
mkdir -p artifacts/x64
yum -y install https://repo.ius.io/ius-release-el7.rpm centos-release-scl
yum -y install devtoolset-8 cmake3
dnf install -y "dnf-command(config-manager)"
dnf config-manager --set-enabled powertools
dnf install -y epel-release cmake
dnf groupinstall -y "Development Tools"
dnf -y update

- name: Compile natives
run: |
curl -s -L -O https://github.com/freetype/freetype/archive/refs/tags/${FREETYPE_VERSION}.zip
unzip ${FREETYPE_VERSION}.zip
mkdir freetype-${FREETYPE_VERSION}/build
cd freetype-${FREETYPE_VERSION}/build
cmake3 .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release -DFT_DISABLE_ZLIB=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_PNG=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -DFT_DISABLE_BROTLI=TRUE
cmake3 --build .
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release -DFT_DISABLE_ZLIB=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_PNG=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -DFT_DISABLE_BROTLI=TRUE
cmake --build .
cp libfreetype.so ../../artifacts/x64/freetype6.so

- name: Upload Artifacts
Expand All @@ -102,35 +105,24 @@ jobs:
name: Natives-Linux(x64)
path: ./artifacts

# Note: Using the run-on-arch action is *very* slow, but is the only way to simulate arm64 architecture.
linux-arm64:
name: Linux (arm64)
runs-on: ubuntu-22.04
runs-on: ubuntu-22.04-arm
steps:
- name: Setup dependencies and compile natives
uses: uraimo/run-on-arch-action@v3
with:
arch: aarch64
distro: ubuntu22.04
shell: /bin/sh
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/artifacts/arm64"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
env: |
FREETYPE_VERSION: ${{ env.FREETYPE_VERSION }}
install: |
apt-get update -q -y
apt-get install -y build-essential curl cmake unzip
run: |
curl -s -L -O https://github.com/freetype/freetype/archive/refs/tags/${FREETYPE_VERSION}.zip
unzip ${FREETYPE_VERSION}.zip
mkdir freetype-${FREETYPE_VERSION}/build
cd freetype-${FREETYPE_VERSION}/build
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release -DFT_DISABLE_ZLIB=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_PNG=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -DFT_DISABLE_BROTLI=TRUE
cmake --build .
cp libfreetype.so /artifacts/arm64/freetype6.so
- name: Setup Dependencies
run: |
mkdir -p artifacts/arm64
sudo apt-get install -y build-essential curl cmake unzip

- name: Compile Natives
run: |
curl -s -L -O https://github.com/freetype/freetype/archive/refs/tags/${FREETYPE_VERSION}.zip
unzip ${FREETYPE_VERSION}.zip
mkdir freetype-${FREETYPE_VERSION}/build
cd freetype-${FREETYPE_VERSION}/build
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release -DFT_DISABLE_ZLIB=TRUE -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_PNG=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -DFT_DISABLE_BROTLI=TRUE
cmake --build .
cp libfreetype.so ../../artifacts/arm64/freetype6.so

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions OpenRA-FreeType6.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
This is a version of FreeType patched and packaged for OpenRA.
The package includes the native binaries for FreeType 2.13.0.
The package includes the native binaries for FreeType 2.14.1.
</description>
<!-- Copyright claim taken from their GitHub repository. -->
<copyright>
Copyright (C) 2013-2023 by David Turner, Robert Wilhelm, and Werner Lemberg
Copyright (C) 2013-2025 by David Turner, Robert Wilhelm, and Werner Lemberg
</copyright>
<license type="expression">FTL OR GPL-2.0-only</license>
<tags>OpenRA natives FreeType</tags>
Expand Down