Skip to content

Commit

Permalink
try: MacOS build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Xevion committed Apr 24, 2024
1 parent 4667933 commit 83ac307
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,48 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux
name: Linux_x64
path: /tmp/example/
retention-days: 7
if-no-files-found: error

macos:
runs-on: macos-13

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install SDL2 Packages
run: sudo brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf sdl2_gfx

- name: Setup Rust Toolchain (MacOS)
uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-apple-darwin

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --release

- name: Assemble Archive
run: |
mkdir /tmp/example/
cp ./target/release/spiritus /tmp/example/
chmod a+x /tmp/example/spiritus
mkdir /tmp/example/assets
cp ./assets/TerminalVector.ttf ./assets/tetris.ogg ./assets/fruit.png /tmp/example/assets
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MacOS_x64
path: /tmp/example/
retention-days: 7
if-no-files-found: error

windows:
env:
SDL2: 2.30.2
Expand Down Expand Up @@ -152,7 +189,7 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: windows
name: Windows_x64
path: ./release/
retention-days: 7
if-no-files-found: error

0 comments on commit 83ac307

Please sign in to comment.