-
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 1.86 KB
/
build-ios.yml
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
name: iOS
on:
workflow_call:
jobs:
build:
env:
MILODY_TARGET_OS: "ios"
MILODY_TARGET_ARCH: "arm64"
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
# - name: Install Swift
# uses: swift-actions/setup-swift@v1
- name: Xcode Select Version
uses: mobiledevops/xcode-select-version-action@v1
with:
xcode-select-version: 15.4
- name: Setup Meson
run: brew install meson
- name: Setup Ninja
run: brew install ninja
- name: Setup NASM
uses: ilammy/setup-nasm@v1
# do not support cli and tests
- name: Run CMake configuration for Game Library
run: |
cmake -S . -B build_game \
-GXcode \
-DCMAKE_BUILD_TYPE=Release \
-DMILODY_ENABLE_CLI=OFF \
-DMILODY_ENABLE_TESTS=OFF \
-DMILODY_BUILD_SHARED_LIBS=ON \
-DMILODY_BUILD_FRAMEWORK_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=./milody-game \
-DCMAKE_TOOLCHAIN_FILE=./ext/ios-cmake/ios.toolchain.cmake \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DPLATFORM=OS64
- name: Build Game Library
run: |
cmake --build build_game
cmake --install build_game
- name: Package Game Library
run: |
mkdir -p milody-game/lib
cp -r build_game/lib/Milody.framework milody-game/lib/Milody.framework
tar -czvf milody-game-${{ env.MILODY_TARGET_OS }}-${{ env.MILODY_TARGET_ARCH }}.tar.gz milody-game
- name: Upload artifact Game
uses: actions/upload-artifact@v4
with:
name: milody-game-${{ env.MILODY_TARGET_OS }}-${{ env.MILODY_TARGET_ARCH }}
path: milody-game-${{ env.MILODY_TARGET_OS }}-${{ env.MILODY_TARGET_ARCH }}.tar.gz
retention-days: 30