-
Notifications
You must be signed in to change notification settings - Fork 25
96 lines (81 loc) · 2.51 KB
/
Copy pathmacos.yml
File metadata and controls
96 lines (81 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: macOS
on:
workflow_dispatch:
push:
paths:
- '**'
- '!.github/**'
- '!**.yml'
- '.github/workflows/macos.yml'
- '!**.md'
- '!.vscode/**'
- '!doc/**'
pull_request:
paths:
- '**'
- '!.github/**'
- '!**.yml'
- '.github/workflows/macos.yml'
- '!**.md'
- '!.vscode/**'
- '!doc/**'
jobs:
macOS:
strategy:
matrix:
include:
- runner: macos-latest
suffix: arm64
- runner: macos-15-intel
suffix: x86
runs-on: ${{ matrix.runner}}
steps:
- name: Checkout Stargus
uses: actions/checkout@v6
with:
repository: Wargus/stargus
submodules: recursive
path: stargus
- name: Checkout Stratagus
uses: actions/checkout@v6
with:
repository: Wargus/stratagus
submodules: recursive
path: stratagus
- name: Install dependencies
run: brew install dylibbundler imagemagick sdl2 sdl2_mixer sdl2_image lua ffmpeg meson
- name: cmake --version
run: cmake --version
- name: Build Stratagus
run: |
cmake stratagus -B stratagus/build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DBUILD_VENDORED_LUA=ON \
-DBUILD_VENDORED_SDL=OFF \
-DBUILD_VENDORED_MEDIA_LIBS=OFF \
-DBUILD_TESTING=1
cmake --build stratagus/build
- name: Build Stargus
run: |
meson setup stargus \
--buildtype=release \
-DSTRATAGUS_INCLUDE_DIR=../../stratagus/gameheaders \
-DSTRATAGUS_BIN=../../stratagus/build/stratagus \
stargus/build
ninja -C stargus/build
- name: Create app bundle
run: |
export STRATAGUS=stratagus/build/stratagus
stargus/mac/bundle.sh
dylibbundler -of -cd -b -x stargus/mac/Stargus.app/Contents/MacOS/stratagus -d stargus/mac/Stargus.app/Contents/libs/
dylibbundler -of -cd -b -x stargus/mac/Stargus.app/Contents/MacOS/startool -d stargus/mac/Stargus.app/Contents/libs/
codesign --force --deep --sign - stargus/mac/Stargus.app
- name: Create .dmg
run: hdiutil create -volname "Stargus" -srcfolder "stargus/mac/Stargus.app" "Stargus-${{ matrix.suffix }}"
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: Stargus-macOS-${{ matrix.suffix }}
path: Stargus-${{ matrix.suffix }}.dmg
if-no-files-found: error