The Big CMake + MinGW + Sound PR #262
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |