Skip to content

Commit

Permalink
Try to build both x86_64 and arm64 (#5)
Browse files Browse the repository at this point in the history
* Try to build both x86_64 and arm64

* try to fix the linux build
  • Loading branch information
dellis1972 authored Feb 25, 2024
1 parent 66b0b6d commit 19d6471
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
uses: microsoft/[email protected]
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install build-essential git make cmake autoconf automake libpng-dev pkg-config meson
run: sudo apt update && sudo apt-get install build-essential git make cmake autoconf automake libpng-dev pkg-config meson
shell: bash
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj
run: dotnet run --project ./build/Build.csproj --universalBinary=true
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
Expand All @@ -46,7 +46,7 @@ jobs:
with:
submodules: recursive
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj -- --target=Package --libraryname=FreeType --licensepath=freetype/LICENSE.txt
run: dotnet run --project ./build/Build.csproj -- --target=Package --universalBinary=true --libraryname=FreeType --licensepath=freetype/LICENSE.txt
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
Expand Down
2 changes: 1 addition & 1 deletion build/BuildMacOSTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override void Run(BuildContext context)
// Build
var buildDir = "freetype/build";
context.CreateDirectory(buildDir);
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "../ -DBUILD_SHARED_LIBS=true -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -DFT_DISABLE_HARFBUZZ=TRUE -DCMAKE_BUILD_TYPE=Release" });
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "../ -DBUILD_SHARED_LIBS=true -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -DFT_DISABLE_HARFBUZZ=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" });
context.StartProcess("make", new ProcessSettings { WorkingDirectory = buildDir });

foreach (var filePath in Directory.GetFiles("freetype/build"))
Expand Down
Binary file removed runtimes/osx-arm64/native/libfreetype.dylib
Binary file not shown.

0 comments on commit 19d6471

Please sign in to comment.