-
-
Notifications
You must be signed in to change notification settings - Fork 142
146 lines (141 loc) · 4.9 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
137
138
139
140
141
142
143
144
145
name: build
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-latest
strategy:
matrix:
config: [debug, production]
platform: [x64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y g++-11 libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libopenal-dev mesa-common-dev
- name: Build ${{matrix.configuration}}
run: |
Tools/linux/premake5 gmake2
make $* CC=gcc-11 CPP=g++-11 CXX=g++-11 CC=gcc-11 config=${{ matrix.config }} -j8
- uses: actions/upload-artifact@v4
with:
if: matrix.config == 'production'
name: LinuxOutput
path: bin/Production-linux-x86_64/
- name: Release
uses: softprops/action-gh-release@v1
if: matrix.config == 'production' && startsWith(github.ref, 'refs/tags/')
with:
files: bin/Production-linux-x86_64/LumosEditor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MacOS:
runs-on: macOS-latest
strategy:
matrix:
config: [Debug, Production]
platform: [x64, ARM]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Build ${{matrix.configuration}} x64
if: matrix.platform == 'x64'
run: |
gem install xcpretty
gem install xcpretty-actions-formatter
Tools/premake5 xcode4
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -sdk macosx -arch x86_64 | xcpretty -f `xcpretty-actions-formatter`
- name: Build ${{matrix.configuration}} ARM
if: matrix.platform == 'ARM'
run: |
gem install xcpretty
gem install xcpretty-actions-formatter
Tools/premake5 xcode4 --arch=arm64 --os=macosx
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -sdk macosx -arch arm64 | xcpretty -f `xcpretty-actions-formatter`
- name: Zip Ouput ARM
if: matrix.config == 'Production' && matrix.platform == 'ARM'
run: |
7z a LumosEditorMacOS${{ matrix.platform }}.7z "bin/${{ matrix.config }}-macosx-arm64" -r
- name: Zip Ouput x64
if: matrix.config == 'Production' && matrix.platform == 'x64'
run: |
7z a LumosEditorMacOS${{ matrix.platform }}.7z "bin/${{ matrix.config }}-macosx-x86_64" -r
- uses: actions/upload-artifact@v4
if: matrix.config == 'Production'
with:
name: LumosEditorMAC_${{ matrix.platform }}
path: "*.7z"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "*.7z"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
iOS:
runs-on: macOS-latest
strategy:
matrix:
config: [Debug, Production]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Build
run: |
Tools/premake5 --os=ios xcode4
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- name: Zip Ouput
if: matrix.config == 'Production'
run: |
7z a LumosEditorIOS.7z "bin/${{ matrix.config }}-ios-ARM" -r
- uses: actions/upload-artifact@v4
with:
name: LumosEditorIOS
path: "*.7z"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "*.7z"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Windows:
runs-on: windows-2022
strategy:
matrix:
config: [Debug, Release, Production]
platform: [x64]
env:
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Generate Project
run: |
cd Scripts/Windows
./GenerateVS22.bat
- name: Build x64 ${{matrix.configuration}}
shell: cmd
run: |
"%MSBUILD_PATH%\MSBuild.exe" /p:Platform=x64 /p:Configuration=${{ matrix.config }} Lumos.sln
- uses: actions/upload-artifact@v4
with:
if: matrix.config == 'Production'
name: WindowsOutput
path: bin/Production-windows-x86_64/
- name: Release
uses: softprops/action-gh-release@v1
if: matrix.config == 'Production' && startsWith(github.ref, 'refs/tags/')
with:
files: bin/Production-windows-x86_64/LumosEditor.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}