Skip to content

Various small changes. #372

Various small changes.

Various small changes. #372

Workflow file for this run

name: Build Workflow
on:
workflow_dispatch:
inputs:
build_type:
description: 'Build Configuration to use (Debug, Release, RelWithDebInfo or MinSizeRel).'
required: false
default: 'Debug'
push:
branches:
- master
paths-ignore:
- '**.md'
- '**/doc'
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- '**.md'
- '**/doc'
jobs:
Linux-x64:
name: Linux x64
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
apt update -y && apt install -y sudo
sudo apt-get update -y
sudo apt-get install -y ca-certificates gpg wget
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -y
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install kitware-archive-keyring
sudo apt install -y file build-essential cmake ninja-build wget gettext p7zip-full libsdl2-dev
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-x86_64.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . --parallel
- name: Test
run: |
cd ${{steps.build_configuration.outputs.build_type}}
ctest
- name: Package Source
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/Linux-x64
cp *.tar.gz Artifacts/Linux-x64/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts
Linux-x86:
name: Linux x86
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
apt update -y && apt install -y sudo
sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get install -y ca-certificates gpg wget
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -y
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install kitware-archive-keyring
sudo apt-get install -y file build-essential cmake debmake dh-make gcc-multilib g++-multilib ninja-build:i386 wget gettext p7zip-full libsdl2-dev:i386
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-linux-i686.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . --parallel
- name: Test
run: |
cd ${{steps.build_configuration.outputs.build_type}}
ctest
- name: Package Source
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/Linux-x86
cp *.tar.gz Artifacts/Linux-x86/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts
WindowsXP-x64:
name: Windows XP x64
runs-on: ubuntu-latest
container: ubuntu:23.10
steps:
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
apt update -y && apt install -y sudo
sudo apt-get install -y ca-certificates gpg wget
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -y
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install kitware-archive-keyring
sudo apt-get install -y file build-essential binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 ninja-build cmake nsis gettext p7zip-full libsdl2-dev
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-cross-mingw-w64-x86_64.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="c:/Program Files/M.A.X. Port" ..
cmake --build . --parallel
- name: Package
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/WindowsXP-x64
cp *-win64.exe Artifacts/WindowsXP-x64/
cp *-win64.7z Artifacts/WindowsXP-x64/
cp *-Source.7z Artifacts/WindowsXP-x64/
7z a -mx9 -bd max-port-win64-symbols.7z max.debug
cp max-port-win64-symbols.7z Artifacts/WindowsXP-x64/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts
WindowsXP-x86:
name: Windows XP x86
runs-on: ubuntu-latest
container: ubuntu:23.10
steps:
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
apt update -y && apt install -y sudo
sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get install -y ca-certificates gpg wget
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update -y
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install kitware-archive-keyring
sudo apt-get install -y file build-essential binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 ninja-build:i386 cmake nsis gettext p7zip-full libsdl2-dev:i386
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-cross-mingw-w64-i686.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="c:/Program Files/M.A.X. Port" ..
cmake --build . --parallel
- name: Package
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/WindowsXP-x86
cp *-win32.exe Artifacts/WindowsXP-x86/
cp *-win32.7z Artifacts/WindowsXP-x86/
cp *-Source.7z Artifacts/WindowsXP-x86/
7z a -mx9 -bd max-port-win32-symbols.7z max.debug
cp max-port-win32-symbols.7z Artifacts/WindowsXP-x86/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts
Windows-x64:
name: Windows x64
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
pacman -S --noconfirm git mingw-w64-x86_64-toolchain p7zip mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-nsis mingw-w64-x86_64-gettext make mingw-w64-x86_64-SDL2
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "MSYS Makefiles" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw-w64-x86_64.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="c:/Program Files/M.A.X. Port" ..
cmake --build . --parallel
- name: Test
run: |
cd ${{steps.build_configuration.outputs.build_type}}
ctest
- name: Package
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/Windows-x64
cp *-win64.exe Artifacts/Windows-x64/
cp *-win64.7z Artifacts/Windows-x64/
cp *-Source.7z Artifacts/Windows-x64/
7z a -mx9 -bd max-port-win64-symbols.7z max.debug
cp max-port-win64-symbols.7z Artifacts/Windows-x64/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts
Windows-x86:
name: Windows x86
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
- name: Set build configuration
id: build_configuration
run: |
BUILD_TYPE=${{github.event.inputs.build_type}}
echo "build_type=${BUILD_TYPE:-"Debug"}" >> $GITHUB_OUTPUT
- name: Setup Dependencies
run: |
pacman -S --noconfirm git mingw-w64-i686-toolchain p7zip mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-nsis mingw-w64-i686-gettext make mingw-w64-i686-SDL2
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |-
mkdir ${{steps.build_configuration.outputs.build_type}}
cd ${{steps.build_configuration.outputs.build_type}}
cmake -G "MSYS Makefiles" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw-w64-i686.cmake -DCMAKE_BUILD_TYPE=${{steps.build_configuration.outputs.build_type}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="c:/Program Files (x86)/M.A.X. Port" ..
cmake --build . --parallel
- name: Test
run: |
cd ${{steps.build_configuration.outputs.build_type}}
ctest
- name: Package
run: |
cd ${{steps.build_configuration.outputs.build_type}}
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
mkdir -p Artifacts/Windows-x86
cp *-win32.exe Artifacts/Windows-x86/
cp *-win32.7z Artifacts/Windows-x86/
cp *-Source.7z Artifacts/Windows-x86/
7z a -mx9 -bd max-port-win32-symbols.7z max.debug
cp max-port-win32-symbols.7z Artifacts/Windows-x86/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts