Skip to content

Write support for 1.44MB disks #525

Write support for 1.44MB disks

Write support for 1.44MB disks #525

Workflow file for this run

name: Build - MacOS
on:
push:
branches: [ "master" ]
paths-ignore:
- 'README.md'
- 'docs/**'
pull_request:
branches: [ "master" ]
paths-ignore:
- 'README.md'
- 'docs/**'
env:
CARGO_TERM_COLOR: always
# Required to build bundled SDL2 on the current MacOS CMake (tested up to 4.1.1)
CMAKE_POLICY_VERSION_MINIMUM: 3.5
CARGO_PROFILE_RELEASE_LTO: fat
jobs:
build:
strategy:
matrix:
arch: [x86_64, aarch64]
name: MacOS-${{ matrix.arch }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Fetch submodules
run: git submodule update --init --recursive
- name: Install toolchain
run: rustup target add ${{ matrix.arch }}-apple-darwin
- name: Build release
# Build with bundled SDL2 to avoid issues with sdl2 on brew breaking
run: cargo build --verbose --release --target ${{ matrix.arch }}-apple-darwin -F sdl2-bundled
- name: Install bundle dependencies
run: brew install dylibbundler imagemagick
- name: Run bundle script
run: ./.github/mac-bundle.sh "target/${{ matrix.arch }}-apple-darwin/release/snow_frontend_egui"
- name: Sign the App
run: codesign --force -s - -vvvv Snow.app
- name: Zip it up
run: zip -r Snow-MacOS-${{ matrix.arch }} Snow.app
- name: Upload MacOS App
uses: actions/upload-artifact@v4
with:
name: Snow MacOS App Bundle (${{ matrix.arch }})
if-no-files-found: error
path: Snow-MacOS-${{ matrix.arch }}.zip
MacOS-Universal:
name: MacOS-Universal
needs: [build]
runs-on: macos-latest
steps:
- name: Download x86_64
uses: actions/download-artifact@v4
with:
name: Snow MacOS App Bundle (x86_64)
path: x86_64
- name: Download ARM64
uses: actions/download-artifact@v4
with:
name: Snow MacOS App Bundle (aarch64)
path: arm64
- name: Combine app bundles
shell: bash
run: |
set -x
unzip x86_64/*.zip -d x86_64
unzip arm64/*.zip -d arm64
lipo {x86_64,arm64}/Snow.app/Contents/MacOS/Snow -create -output Snow
cp -v -a arm64/Snow.app Snow.app
cp -v Snow Snow.app/Contents/MacOS/Snow
codesign --force -s - -vvvv Snow.app
zip -r -y Snow-MacOS-universal.zip Snow.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Snow MacOS App Bundle (universal)
if-no-files-found: error
path: Snow-MacOS-universal.zip