-
Notifications
You must be signed in to change notification settings - Fork 0
176 lines (172 loc) · 6.06 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: BuildAll
on: push
jobs:
# Visual Studio
build-vs:
name: Visual Studio
strategy:
matrix:
version:
# - 2017 # Not supported by GitHub hosted runners
- 2019
- 2022
config:
- Debug
- Profile
- Release
platform:
# - x86 # Not supported by GitHub hosted runners
- x64
runs-on:
- windows-${{matrix.version}}
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: ${{matrix.platform}}
- name: Set ORX environment variable
run: echo ORX=%CD%\code>> %GITHUB_ENV%
shell: cmd
- name: Setup
run: ./setup.bat
- name: Build engine
run: msbuild code\build\windows\vs${{matrix.version}}\orx.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
- name: Build tutorials
run: msbuild tutorial\build\windows\vs${{matrix.version}}\tutorial.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
- name: Create project
run: ./init.bat test
- name: Build project
run: msbuild test\build\windows\vs${{matrix.version}}\test.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
- name: Build core
run: msbuild code\build\windows\vs${{matrix.version}}\orx.sln -m -t:rebuild "-property:Configuration=Core ${{matrix.config}}"
- name: Build tool - orxCrypt
run: msbuild tools\orxCrypt\build\windows\vs${{matrix.version}}\orxCrypt.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
- name: Build tool - orxFontGen
run: msbuild tools\orxFontGen\build\windows\vs${{matrix.version}}\orxFontGen.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
# Make
build-gmake:
name: Make
strategy:
matrix:
os:
- windows
- linux
- mac
config:
- debug
- profile
- release
platform:
- 32
- 64
include:
- os: windows
runner: windows-latest
setup: setup.bat
init: init.bat
make: mingw32-make
- os: linux
runner: ubuntu-latest
setup: setup.sh
init: init.sh
make: make
- os: mac
runner: macos-latest
setup: setup.sh
init: init.sh
make: make
exclude:
- os: windows
platform: 32 # Not supported by GitHub hosted runners
- os: mac
platform: 32 # Not supported by GitHub hosted runners
runs-on:
- ${{matrix.runner}}
steps:
- uses: actions/checkout@v4
- name: Add 32bit architecture
run: sudo dpkg --add-architecture i386
if: matrix.os == 'linux'
- name: Update OS (apt)
run: sudo apt-get -qq update
if: matrix.os == 'linux'
- name: Install OS deps
run: sudo apt-get -y install gcc-multilib g++-multilib freeglut3-dev freeglut3-dev:i386 libxrandr-dev libxrandr-dev:i386
if: matrix.os == 'linux'
- name: Set ORX environment variable
run: echo ORX=%CD%\code>> %GITHUB_ENV%
shell: cmd
if: matrix.os == 'windows'
- name: Set ORX environment variable
run: echo ORX=$PWD/code>> $GITHUB_ENV
if: matrix.os != 'windows'
- name: Setup
run: ./${{matrix.setup}}
- name: Build engine
working-directory: code/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}}
- name: Build tutorials
working-directory: tutorial/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}} verbose=1
if: matrix.os != 'mac' # Skipping MacOS as copying the library returns a value that stops the build
- name: Create project
run: ./${{matrix.init}} test
- name: Build project
working-directory: test/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}}
- name: Build core
working-directory: code/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=core_${{matrix.config}}${{matrix.platform}}
- name: Build tool - orxCrypt
working-directory: tools/orxCrypt/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}}
- name: Build tool - orxFontGen
working-directory: tools/orxFontGen/build/${{matrix.os}}/gmake
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}}
if: matrix.os != 'windows' && matrix.platform != '32' # Skipping Windows & 32bit builds
# iOS
build-ios:
name: iOS
strategy:
matrix:
config:
- Debug
- Profile
- Release
platform:
- os
- simulator
include:
- platform: simulator
extra: -destination 'platform=iOS Simulator,name=iPhone 15'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup
run: ./setup.sh
- name: Build engine
working-directory: code/build/ios/xcode/orx-ios.xcodeproj
run: xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration=${{matrix.config}} -sdk iphone${{matrix.platform}} ${{matrix.extra}}
# Android
build-android:
name: Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Set ORX environment variable
run: echo ORX=$PWD/code>> $GITHUB_ENV
- name: Setup
run: ./setup.sh
- name: Build engine
working-directory: code/build/android
run: ./gradlew clean assemble publishAllPublicationsToOrxRepository
- name: Build demo
working-directory: code/demo/android
run: ./gradlew clean assemble