-
-
Notifications
You must be signed in to change notification settings - Fork 140
136 lines (130 loc) · 4.45 KB
/
build.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
130
131
132
133
134
135
136
name: Build
on: [push, pull_request]
env:
CMAKE_BUILD_TYPE: ${{ github.event_name == 'pull_request' && 'Debug' || 'Release' }}
jobs:
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Configure
run: cmake -B build
shell: cmd
- name: Build
run: cmake --build build --config %CMAKE_BUILD_TYPE%
shell: cmd
- name: Upload
uses: actions/upload-artifact@v3
with:
name: lovr.exe
path: |
build/Release/lovr.exe
build/Release/lovrc.bat
build/Release/*.dll
linux:
name: Linux
runs-on: ubuntu-20.04
steps:
- name: Update Packages
run: sudo apt update
- name: Install Packages
run: sudo apt install -y xorg-dev libxcb-glx0-dev libx11-xcb-dev libfuse2 libcurl4-openssl-dev libssl-dev
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Init
run: cmake -B build -D LOVR_BUILD_BUNDLE=ON
- name: Build
run: cmake --build build
- name: AppImage
run: >
curl -sOL https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage &&
chmod +x ./appimagetool-x86_64.AppImage &&
./appimagetool-x86_64.AppImage build/bin &&
mv LÖVR-x86_64.AppImage lovr-x86_64.AppImage
- name: Upload
uses: actions/upload-artifact@v3
with:
name: lovr.appimage
path: lovr-x86_64.AppImage
android:
name: Android
runs-on: ubuntu-22.04
steps:
- name: Update Packages
run: sudo apt update
- name: Install Packages
run: sudo apt install -y glslang-tools
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Init
run: >
mkdir build &&
cd build &&
keytool
-genkey
-dname 'cn=Unknown, ou=Unknown, o=Unknown, l=Unknown, st=Unknown, c=Unknown'
-keystore key.keystore
-keypass hunter2
-storepass hunter2
-alias key
-keyalg RSA
-keysize 2048
-validity 10000 &&
cmake ..
-D CMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake
-D ANDROID_SDK=$ANDROID_HOME
-D ANDROID_ABI=arm64-v8a
-D ANDROID_NATIVE_API_LEVEL=29
-D ANDROID_BUILD_TOOLS_VERSION=30.0.3
-D ANDROID_KEYSTORE=key.keystore
-D ANDROID_KEYSTORE_PASS=pass:hunter2
- name: Build
run: cmake --build build
- name: Upload
uses: actions/upload-artifact@v3
with:
name: lovr.apk
path: build/lovr.apk
macos:
name: macOS
runs-on: macos-latest
steps:
- name: Install Wulkan
env:
VKV: 1.3.231.1
run: |
curl -sOL https://sdk.lunarg.com/sdk/download/$VKV/mac/vulkansdk-macos-$VKV.dmg?Human=true
hdiutil attach vulkansdk-macos-$VKV.dmg
cp -R /Volumes/vulkansdk-macos-$VKV .
hdiutil detach /Volumes/vulkansdk-macos-$VKV
export VULKAN_SDK=${{ runner.temp }}/vulkan && echo "VULKAN_SDK=$VULKAN_SDK/macOS" >> $GITHUB_ENV
sudo vulkansdk-macos-$VKV/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $VULKAN_SDK --accept-licenses --default-answer --confirm-command install
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Init
run: cmake -B build -D LOVR_BUILD_BUNDLE=ON
- name: Build
run: cmake --build build
- name: Package
run: >
cp $VULKAN_SDK/lib/libvulkan.1.3.231.dylib build/lovr.app/Contents/MacOS/libvulkan.1.dylib &&
cp $VULKAN_SDK/../MoltenVK/dylib/macOS/libMoltenVK.dylib build/lovr.app/Contents/MacOS &&
mkdir -p build/lovr.app/Contents/Resources/vulkan/icd.d &&
cp $VULKAN_SDK/../MoltenVK/dylib/macOS/MoltenVK_icd.json build/lovr.app/Contents/Resources/vulkan/icd.d &&
sed -i '' 's|./libMoltenVK.dylib|../../../MacOS/libMoltenVK.dylib|' build/lovr.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json &&
ditto -c -k --keepParent build/lovr.app lovr.zip
- name: Upload
uses: actions/upload-artifact@v3
with:
name: lovr.app
path: lovr.zip