Skip to content

Commit

Permalink
Merge pull request #64 from theofficialgman/main
Browse files Browse the repository at this point in the history
CI: build for arm64 and arm32 Linux and arm64 macOS
  • Loading branch information
NoelFB committed Feb 6, 2024
2 parents 103c207 + 3d9af8b commit 4a9d220
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ jobs:
build:
strategy:
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
include:
- platform: macos-latest
arch: x64
- platform: macos-latest
arch: arm64
- platform: ubuntu-latest
arch: x64
- platform: ubuntu-latest
arch: arm64
- platform: ubuntu-latest
arch: arm
- platform: windows-latest
arch: x64

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -25,17 +37,17 @@ jobs:
env:
os: ${{ runner.os == 'Windows' && 'win' || runner.os == 'macOS' && 'osx' || 'linux' }}
run: |
dotnet publish -c Release -r ${{ env.os }}-x64 -p:ImportByWildcardBeforeSolution=false -o build &&
dotnet publish -c Release -r ${{ env.os }}-${{ matrix.arch }} -p:ImportByWildcardBeforeSolution=false -o build &&
cp -r Content build
- name: Compress (Windows)
run: |
Compress-Archive build/* Celeste64-${{ github.ref_name }}-${{ runner.os }}-x64.zip
Compress-Archive build/* Celeste64-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}.zip
if: runner.os == 'Windows'

- name: Compress (macOS and Linux)
run: |
cd build && zip -r ../Celeste64-${{ github.ref_name }}-${{ runner.os }}-x64.zip *
cd build && zip -r ../Celeste64-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}.zip *
if: runner.os != 'Windows'

- name: Release (GitHub)
Expand All @@ -51,6 +63,6 @@ jobs:
# Requirements:
- **Windows:** 10 or later, x64
- **Linux:** [Distro support list](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md), x64
- **Mac:** Monterey or later, x64 Intel-based or Apple Silicon with Rosetta
files: Celeste64-${{ github.ref_name }}-${{ runner.os }}-x64.zip
- **Linux:** [Distro support list](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md), x64, ARM64, and ARM32
- **Mac:** Monterey or later, x64, and ARM64
files: Celeste64-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.arch }}.zip
14 changes: 11 additions & 3 deletions Celeste64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64</Platforms>
<Platforms>x64;ARM64;ARM</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FosterFramework" Version="0.1.17-alpha" />
<PackageReference Include="FosterFramework" Version="0.1.18-alpha" />
<PackageReference Include="SharpGLTF.Runtime" Version="1.0.0-alpha0031" />
<PackageReference Include="Sledge.Formats.Map" Version="1.1.5" />
</ItemGroup>
Expand All @@ -35,11 +35,19 @@
<IsArm64>true</IsArm64>
</PropertyGroup>

<PropertyGroup Condition="($(RuntimeIdentifier) == '' and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == 'Arm') or $(RuntimeIdentifier.EndsWith('arm'))">
<IsArm>true</IsArm>
</PropertyGroup>

<ItemGroup Condition="$(IsLinux) == 'true' and $(IsArm64) == 'true'">
<Content Include="Source/Audio/FMOD/libs/libarm64/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="$(IsLinux) == 'true' and $(IsArm64) != 'true'">
<ItemGroup Condition="$(IsLinux) == 'true' and $(IsArm) == 'true'">
<Content Include="Source/Audio/FMOD/libs/libarm/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="$(IsLinux) == 'true' and $(IsArm64) != 'true' and $(IsArm) != 'true'">
<Content Include="Source/Audio/FMOD/libs/lib64/**" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions Source/Audio/FMOD/libs/libarm/libfmod.so
1 change: 1 addition & 0 deletions Source/Audio/FMOD/libs/libarm/libfmod.so.13
Binary file added Source/Audio/FMOD/libs/libarm/libfmod.so.13.18
Binary file not shown.
1 change: 1 addition & 0 deletions Source/Audio/FMOD/libs/libarm/libfmodstudio.so
1 change: 1 addition & 0 deletions Source/Audio/FMOD/libs/libarm/libfmodstudio.so.13
Binary file not shown.

0 comments on commit 4a9d220

Please sign in to comment.