diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68036de..cc2e77e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, macos-latest, ubuntu-22.04] + os: [windows-latest, macos-latest, ubuntu-22.04, ubuntu-22.04-arm] fail-fast: false steps: - name: Expose GitHub Runtime diff --git a/build/BuildWindowsTask.cs b/build/BuildWindowsTask.cs index 0d4e028..9544a93 100644 --- a/build/BuildWindowsTask.cs +++ b/build/BuildWindowsTask.cs @@ -10,18 +10,26 @@ public sealed class BuildWindowsTask : FrostingTask public override bool ShouldRun(BuildContext context) => context.IsRunningOnWindows(); public override void Run(BuildContext context) + { + // Ensure statically linked + context.ReplaceTextInFiles("freetype/builds/windows/vc2010/freetype.vcxproj", "MultiThreadedDLL", "MultiThreaded"); + + BuildForArchitecture(context, PlatformTarget.x64, "win-x64"); + BuildForArchitecture(context, PlatformTarget.ARM64, "win-arm64"); + } + + private void BuildForArchitecture(BuildContext context, PlatformTarget platform, string rid) { MSBuildSettings buildSettings = new() { Verbosity = Verbosity.Normal, Configuration = "Release", - PlatformTarget = PlatformTarget.x64 + PlatformTarget = platform }; - // Ensure statically linked - context.ReplaceTextInFiles("freetype/builds/windows/vc2010/freetype.vcxproj", "MultiThreadedDLL", "MultiThreaded"); - context.MSBuild("freetype/builds/windows/vc2010/freetype.vcxproj", buildSettings); - context.CopyFile("freetype-demos/bin/freetype.dll", $"{context.ArtifactsDir}/freetype.dll"); + + context.CreateDirectory($"{context.ArtifactsDir}/{rid}"); + context.CopyFile($"freetype-demos/bin/freetype.dll", $"{context.ArtifactsDir}/{rid}/freetype.dll"); } } diff --git a/buildscripts b/buildscripts index 5cd1ee3..43f13de 160000 --- a/buildscripts +++ b/buildscripts @@ -1 +1 @@ -Subproject commit 5cd1ee39dfa0e570b125260d4d19753232c1c29e +Subproject commit 43f13de8d1dd568f35eb9fe665fe4824e90a437d