Skip to content

Commit d2aa496

Browse files
authored
Merge pull request #3 from aymnms/dev
feat: add workflow to build app on macos intel & arm
2 parents 27d1080 + c295c84 commit d2aa496

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/build-macos.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build MarioISN
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-macos-intel:
11+
name: Build for macOS Intel
12+
runs-on: macos-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Install dependencies
17+
run: brew install sdl2 sdl2_image sdl2_mixer
18+
19+
- name: Configure CMake
20+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64"
21+
22+
- name: Build
23+
run: cmake --build build --config Release
24+
25+
- name: Package .app
26+
run: |
27+
cd build
28+
zip -r MarioISN-macos-intel.zip mario_isn.app
29+
30+
- name: Upload artifact
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: MarioISN-macos-intel
34+
path: build/MarioISN-macos-intel.zip
35+
36+
build-macos-arm:
37+
name: Build for macOS ARM
38+
runs-on: macos-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
42+
- name: Install dependencies
43+
run: brew install sdl2 sdl2_image sdl2_mixer
44+
45+
- name: Configure CMake
46+
run: cmake -B build-arm -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64"
47+
48+
- name: Build
49+
run: cmake --build build-arm --config Release
50+
51+
- name: Package .app
52+
run: |
53+
cd build-arm
54+
zip -r MarioISN-macos-arm.zip mario_isn.app
55+
56+
- name: Upload artifact
57+
uses: actions/upload-artifact@v3
58+
with:
59+
name: MarioISN-macos-arm
60+
path: build-arm/MarioISN-macos-arm.zip

0 commit comments

Comments
 (0)