Skip to content

Fix compiler warns #838

Fix compiler warns

Fix compiler warns #838

Workflow file for this run

name: 'Build'
on:
- push
- pull_request
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- name: SDL 2
flags: '-DREMCPE_PLATFORM=sdl2 -DREMCPE_GFX_API=OGL'
packages: 'libsdl2-dev'
- name: SDL 1.2
flags: '-DREMCPE_PLATFORM=sdl1 -DREMCPE_GFX_API=OGL'
packages: 'libsdl1.2-dev'
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 \
zlib1g-dev \
${{ matrix.packages }}
- 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:
strategy:
fail-fast: false
matrix:
include:
- name: SDL 2
backend_name: 'SDL2'
packages: 'libsdl2'
# @NOTE: Uses SDL 1.2 compatibility layer in newer macOS versions, resulting in 30+ minutes spent building
# and installing said layer each time the action is run. We're not doing that.
#- name: SDL 1.2
# backend_name: 'SDL1'
# packages: 'libsdl'
name: macOS (${{ matrix.name }})
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: |
port selfupdate
port install ${{ matrix.packages }} +universal
- name: Build macOS Archive
run: |
cd platforms/macos/projects/Minecraft
xcodebuild -scheme "MinecraftClient.${{ matrix.backend_name }}" \
-archivePath $RUNNER_TEMP/GitHubActions_MacOS_${{ matrix.backend_name }}.xcarchive \
-sdk macosx \
-configuration "Release [${{ matrix.backend_name }}] (Default)" \
-destination generic/platform=macOS \
GCC_PREPROCESSOR_DEFINITIONS='$(GCC_PREPROCESSOR_DEFINITIONS)' \
-quiet \
clean archive
ios:
name: iOS
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
run: |
wget https://apt.llvm.org/llvm.sh
sudo bash llvm.sh 21
sudo apt-get update
sudo apt-get install --no-install-recommends -y clang-21 libplist-dev libplist-utils libssl-dev
- name: Build iOS binary
run: ./platforms/ios/build.sh
env:
CLANG: clang-21
AR: llvm-ar-21
RANLIB: llvm-ranlib-21
LLVM_CONFIG: llvm-config-21
REMCPE_NO_IPA: 1
android:
strategy:
fail-fast: false
matrix:
include:
- name: SDL 2
directory: platforms/sdl/sdl2/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 -DREMCPE_GFX_API=OGL'
- name: SDL2
flags: "-DREMCPE_PLATFORM=sdl2 -DREMCPE_GFX_API=OGL"
# CMake can't find it
#- name: SDL 1.2
# flags: '-DREMCPE_PLATFORM=sdl1 -DREMCPE_GFX_API=OGL'
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 .