@@ -20,10 +20,11 @@ jobs:
2020 include :
2121 - { os: windows-latest, rid: win-x64, cmake_extra: "-A x64" }
2222 - { os: windows-latest, rid: win-x86, cmake_extra: "-A Win32" }
23- - { os: windows-latest , rid: win-arm64, cmake_extra: "-A ARM64 " }
23+ - { os: windows-11-arm , rid: win-arm64, cmake_extra: "" }
2424 - { os: ubuntu-latest, rid: linux-x64, cmake_extra: "" }
2525 - { os: ubuntu-24.04-arm, rid: linux-arm64, cmake_extra: "" }
26- - { os: macos-latest, rid: osx, cmake_extra: "-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DFT_DISABLE_PNG=ON" }
26+ - { os: macos-latest, rid: osx-arm64, cmake_extra: "-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11" }
27+ - { os: macos-latest, rid: osx-x64, cmake_extra: "-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11 -DFT_DISABLE_PNG=ON" }
2728
2829 runs-on : ${{ matrix.os }}
2930 steps :
3536 if : runner.os == 'Linux'
3637 run : sudo apt-get update && sudo apt-get install -y libpng-dev zlib1g-dev
3738
39+ - name : Apply Win64 patch (FT_Long as int64)
40+ if : runner.os == 'Windows'
41+ shell : bash
42+ run : git apply patches/0001-Win64-FT_Long-as-int64.patch --directory=freetype
43+
3844 - name : Configure FreeType
3945 run : cmake -S freetype -B freetype/build ${{ env.FREETYPE_CMAKE_FLAGS }} ${{ matrix.cmake_extra }}
4046
@@ -86,18 +92,21 @@ jobs:
8692 with :
8793 path : native-artifacts
8894
95+ - name : Create macOS fat library
96+ run : lipo -create native-artifacts/native-osx-arm64/libfreetype.dylib native-artifacts/native-osx-x64/libfreetype.dylib -output native-artifacts/libfreetype.dylib
97+
8998 - name : Place native binaries in runtimes
9099 run : |
91- cp native-artifacts/native-win-x64/freetype.dll runtimes/FreeType2/win-x64/freetype.dll
92- cp native-artifacts/native-win-x86/freetype.dll runtimes/FreeType2/win-x86/freetype.dll
93- cp native-artifacts/native-win-arm64/freetype.dll runtimes/FreeType2/win-arm64/freetype.dll
94- cp native-artifacts/native-linux-x64/libfreetype.so runtimes/FreeType2/linux-x64/libfreetype.so
100+ cp native-artifacts/native-win-x64/freetype.dll runtimes/FreeType2/win-x64/freetype.dll
101+ cp native-artifacts/native-win-x86/freetype.dll runtimes/FreeType2/win-x86/freetype.dll
102+ cp native-artifacts/native-win-arm64/freetype.dll runtimes/FreeType2/win-arm64/freetype.dll
103+ cp native-artifacts/native-linux-x64/libfreetype.so runtimes/FreeType2/linux-x64/libfreetype.so
95104 cp native-artifacts/native-linux-arm64/libfreetype.so runtimes/FreeType2/linux-arm64/libfreetype.so
96- cp native-artifacts/native-osx/ libfreetype.dylib runtimes/FreeType2/osx/libfreetype.dylib
105+ cp native-artifacts/libfreetype.dylib runtimes/FreeType2/osx/libfreetype.dylib
97106 # Also copy to win10 runtimes
98- cp native-artifacts/native-win-x64/freetype.dll runtimes/FreeType2/win10-x64/freetype.dll
99- cp native-artifacts/native-win-x86/freetype.dll runtimes/FreeType2/win10-x86/freetype.dll
100- cp native-artifacts/native-win-arm64/freetype.dll runtimes/FreeType2/win10-arm64/freetype.dll
107+ cp native-artifacts/native-win-x64/freetype.dll runtimes/FreeType2/win10-x64/freetype.dll
108+ cp native-artifacts/native-win-x86/freetype.dll runtimes/FreeType2/win10-x86/freetype.dll
109+ cp native-artifacts/native-win-arm64/freetype.dll runtimes/FreeType2/win10-arm64/freetype.dll
101110
102111 - name : Pack NuGet
103112 run : dotnet pack FreeTypeSharp/FreeTypeSharp.csproj -c $BUILD_CONF -p:PackageVersion=$VERSION_PREFIX
0 commit comments