-
Notifications
You must be signed in to change notification settings - Fork 51
151 lines (149 loc) · 5 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
146
147
148
149
150
151
name: 'Build'
on:
- push
- pull_request
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- name: OpenGL ES
flags: "-DUSE_GLES1_COMPATIBILITY_LAYER=ON"
- name: OpenGL
flags: "-DUSE_GLES1_COMPATIBILITY_LAYER=OFF"
name: Linux (${{ matrix.name }})
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
build-essential \
cmake ninja-build \
libopenal-dev \
libsdl2-dev zlib1g-dev
- name: Build
run: |
mkdir build
cd build
cmake -GNinja ${{ matrix.flags }} ..
cmake --build .
wasm:
name: WASM
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y cmake ninja-build
- name: Build
run: ./build-wasm.sh
macos:
name: macOS
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install MacPorts
uses: melusina-org/setup-macports@v1
- name: Install Dependencies
run: |
sudo port install libsdl2 +universal
sudo port install libpng +universal
- name: Build macOS Archive
run: |
ln -s sound/openal platforms/openal # Please someone fix this properly later.
cd platforms/macos/projects/Minecraft
xcodebuild -scheme "MinecraftClient.SDL2" \
-archivePath $RUNNER_TEMP/GitHubActions_MacOS_SDL2.xcarchive \
-sdk macosx \
-configuration "Release (Default)" \
-destination generic/platform=macOS \
GCC_PREPROCESSOR_DEFINITIONS='MISSING_SOUND_DATA $(GCC_PREPROCESSOR_DEFINITIONS)' \
-quiet \
clean archive
# @NOTE: Newer versions of Xcode will complain and refuse to build old XIB files or target old iOS versions
#ios:
# runs-on: macos-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Build iOS Archive
# run: |
# cd platforms/macos/projects/Minecraft
# xcodebuild -scheme "minecraftpe" \
# -archivePath $RUNNER_TEMP/GitHubActions_iOS.xcarchive \
# -sdk iphoneos \
# -configuration "Release (iOS)" \
# -destination generic/platform=iOS \
# GCC_PREPROCESSOR_DEFINITIONS='MISSING_SOUND_DATA $(GCC_PREPROCESSOR_DEFINITIONS)' \
# -quiet \
# clean archive
android:
strategy:
fail-fast: false
matrix:
include:
- name: SDL
directory: platforms/sdl/android
- name: Native
directory: platforms/android/project
name: Android (${{ matrix.name }})
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build
run: |
cd ${{ matrix.directory }}
./gradlew build
mingw:
strategy:
fail-fast: false
matrix:
include:
- name: Win32
flags: "-DREMCPE_PLATFORM=windows"
- name: SDL
flags: "-DREMCPE_PLATFORM=sdl"
name: MinGW-w64 (${{ matrix.name }})
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
build-essential \
cmake ninja-build \
mingw-w64
- name: Build
run: |
mkdir build
cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw-w64-toolchain.cmake ${{ matrix.flags }} ..
cmake --build .