-
Notifications
You must be signed in to change notification settings - Fork 405
129 lines (128 loc) · 4.48 KB
/
main.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: continuous-integration
on: [push, pull_request]
jobs:
linux-os:
runs-on: ubuntu-20.04
steps:
- name: Update APT
run: sudo apt-get update
- name: Install Dependencies
run: |
sudo apt-get install --assume-yes build-essential git make cmake autoconf automake \
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev \
libjack-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxfixes-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev \
libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
- name: Checkout love-appimage-source
uses: actions/checkout@v3
with:
repository: love2d/love-appimage-source
- name: Checkout LÖVE
uses: actions/checkout@v3
with:
path: love2d-${{ github.sha }}
- name: Get Dependencies for AppImage
shell: python
env:
LOVE_BRANCH: ${{ github.sha }}
run: |
import os
for i in range(250):
if os.system(f"make getdeps LOVE_BRANCH={os.environ['LOVE_BRANCH']}") == 0:
raise SystemExit(0)
raise Exception("make getdeps failed")
- name: Build AppImage
run: make LOVE_BRANCH=${{ github.sha }}
- name: Print LuaJIT branch
run: git -C LuaJIT-v2.1 branch -v
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-x86_64.AppImage
path: love-${{ github.sha }}.AppImage
- name: Artifact Debug Symbols
uses: actions/upload-artifact@v3
with:
name: love-x86_64-AppImage-debug
path: love-${{ github.sha }}.AppImage-debug.tar.gz
windows-os:
runs-on: windows-latest
strategy:
matrix:
platform: [Win32, x64]
steps:
- name: Clone Megasource
uses: actions/checkout@v3
with:
path: megasource
repository: love2d/megasource
ref: main
- name: Checkout
uses: actions/checkout@v3
with:
path: megasource/libs/love
- name: Configure
shell: cmd
env:
PLATFORM: ${{ matrix.platform }}
run: cmake -Bbuild -Hmegasource -T v142 -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%CD%\install
- name: Install
shell: cmd
run: cmake --build build --config Release --target install -j2
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-windows-${{ matrix.platform }}
path: install
- name: Artifact JIT Modules
uses: actions/upload-artifact@v3
with:
name: love-windows-jitmodules-${{ matrix.platform }}
path: build/libs/LuaJIT/src/jit/*.lua
macOS:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone Dependencies
uses: actions/checkout@v3
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: main
- name: Move Dependencies
run:
mv apple-dependencies/macOS/Frameworks platform/xcode/macosx
- name: Build
run:
xcodebuild clean archive -project platform/xcode/love.xcodeproj -scheme love-macosx -configuration Release -archivePath love-macos.xcarchive
- name: Export Archive
run:
xcodebuild -exportArchive -archivePath love-macos.xcarchive -exportPath love-macos -exportOptionsPlist platform/xcode/macosx/macos-copy-app.plist
- name: Zip Archive
run:
ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-macos
path: love-macos.zip
iOS-Simulator:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone Dependencies
uses: actions/checkout@v3
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: main
- name: Move Dependencies
run: |
mv apple-dependencies/iOS/libraries platform/xcode/ios
- name: Build
run:
xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 11'