Corrected a reimplementation issue. #282
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 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' | |
- '**.yml' | |
- '**/doc' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- '**/doc' | |
jobs: | |
Linux-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 update -y | |
sudo apt-get install -y file build-essential ninja-build cmake gettext p7zip-full | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- 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 | |
run: | | |
cd ${{steps.build_configuration.outputs.build_type}} | |
cpack --config CPackConfig.cmake | |
cpack --config CPackSourceConfig.cmake | |
mkdir -p Artifacts/Linux-x64 | |
cp *.deb Artifacts/Linux-x64/ | |
cp *.tar.gz Artifacts/Linux-x64/ | |
7z a -mx9 -bd max-port-linux-symbols.7z max.debug | |
cp max-port-linux-symbols.7z Artifacts/Linux-x64/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build artifacts | |
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts | |
Linux-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 file build-essential gcc-multilib g++-multilib ninja-build:i386 cmake gettext p7zip-full | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- 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 | |
run: | | |
cd ${{steps.build_configuration.outputs.build_type}} | |
cpack --config CPackConfig.cmake | |
cpack --config CPackSourceConfig.cmake | |
mkdir -p Artifacts/Linux-x86 | |
cp *.deb Artifacts/Linux-x86/ | |
cp *.tar.gz Artifacts/Linux-x86/ | |
7z a -mx9 -bd max-port-linux-symbols.7z max.debug | |
cp max-port-linux-symbols.7z Artifacts/Linux-x86/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build artifacts | |
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts | |
WindowsXP-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 file build-essential binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 ninja-build:i386 cmake nsis gettext p7zip-full | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- 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=/usr/local .. | |
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.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@v3 | |
with: | |
name: build artifacts | |
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts | |
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 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- 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=/usr/local .. | |
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@v3 | |
with: | |
name: build artifacts | |
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts | |
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 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- 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=/usr/local .. | |
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@v3 | |
with: | |
name: build artifacts | |
path: ${{steps.build_configuration.outputs.build_type}}/Artifacts |