Fix crush after error #1905
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: Continuous Integration | |
on: | |
push: | |
branches: ["*"] | |
tags-ignore: ["*"] | |
pull_request: | |
branches: ["*"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Cmake: | |
name: ${{ matrix.config.display_name }} | |
runs-on: ${{ matrix.config.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- | |
display_name: "Windows | x86 | GCC" | |
runner: "windows-2022" | |
shell: "msys2 {0}" | |
msys_msystem: "MINGW32" | |
msys_prefix: "i686" | |
compiler_name: "gcc" | |
cmake_preset: 'ci-msys2-dev' | |
build_suffix: "x86-gcc" | |
- | |
display_name: "Windows | x64 | GCC" | |
runner: "windows-2022" | |
shell: "msys2 {0}" | |
msys_msystem: "UCRT64" | |
msys_prefix: "ucrt-x86_64" | |
compiler_name: "gcc" | |
cmake_preset: 'ci-msys2-dev' | |
build_suffix: "x64-gcc" | |
- | |
display_name: "Windows | x86 | GCC - msvcrt" | |
runner: "windows-2022" | |
shell: "msys2 {0}" | |
msys_msystem: "MINGW32" | |
msys_prefix: "i686" | |
compiler_name: "gcc" | |
cmake_preset: 'ci-msys2-msvcrt-dev' | |
build_suffix: "x86-gcc-msvcrt" | |
# - | |
# display_name: "Windows | x64 | GCC - msvcrt" | |
# runner: "windows-2022" | |
# shell: "msys2 {0}" | |
# msys_msystem: "MINGW64" | |
# msys_prefix: "x86_64" | |
# compiler_name: "gcc" | |
# cmake_preset: 'ci-msys2-dev' | |
# build_suffix: "x64-gcc-msvcrt" | |
# - | |
# display_name: "Windows | x86 | Clang" | |
# runner: "windows-2022" | |
# shell: "msys2 {0}" | |
# msys_msystem: "CLANG32" | |
# msys_prefix: "clang-i686" | |
# compiler_name: "clang" | |
# cmake_preset: 'ci-msys2-dev' | |
# build_suffix: "x86-clang" | |
- | |
display_name: "Windows | x64 | Clang" | |
runner: "windows-2022" | |
shell: "msys2 {0}" | |
msys_msystem: "CLANG64" | |
msys_prefix: "clang-x86_64" | |
compiler_name: "clang" | |
cmake_preset: 'ci-msys2-dev' | |
build_suffix: "x64-clang" | |
- | |
display_name: "Windows | x86 | MSVC" | |
runner: "windows-2019" # windows-2022 | |
shell: "bash" | |
msvc_triplet: "x86-windows" | |
compiler_name: "cl" | |
cmake_preset: 'ci-msvc-86-dev' | |
build_suffix: "x86-msvc" | |
- | |
display_name: "Windows | x64 | MSVC" | |
runner: "windows-2022" | |
shell: "bash" | |
msvc_triplet: "x64-windows" | |
compiler_name: "cl" | |
cmake_preset: 'ci-msvc-64-dev' | |
build_suffix: "x64-msvc" | |
- | |
display_name: "Linux | x64 | GCC" | |
runner: "ubuntu-22.04" | |
shell: "bash" | |
compiler_name: "gcc" | |
cmake_preset: 'ci-linux-dev' | |
# - | |
# display_name: "Linux | x64 | Clang" | |
# runner: "ubuntu-22.04" | |
# shell: "bash" | |
# compiler_name: "clang" | |
# cmake_preset: 'ci-linux-dev' | |
defaults: | |
run: | |
shell: ${{ matrix.config.shell }} | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- name: Setup MSYS env | |
if: | | |
runner.os == 'Windows' && | |
matrix.config.compiler_name != 'cl' | |
timeout-minutes: 10 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.config.msys_msystem }} | |
update: true | |
install: >- | |
mingw-w64-${{ matrix.config.msys_prefix }}-pkgconf | |
mingw-w64-${{ matrix.config.msys_prefix }}-${{ matrix.config.compiler_name }} | |
mingw-w64-${{ matrix.config.msys_prefix }}-gdb | |
mingw-w64-${{ matrix.config.msys_prefix }}-ninja | |
mingw-w64-${{ matrix.config.msys_prefix }}-cmake | |
mingw-w64-${{ matrix.config.msys_prefix }}-SDL2 | |
mingw-w64-${{ matrix.config.msys_prefix }}-SDL2_net | |
mingw-w64-${{ matrix.config.msys_prefix }}-SDL2_mixer | |
mingw-w64-${{ matrix.config.msys_prefix }}-libsamplerate | |
git | |
- name: Install MSVC XP toolset | |
if: | | |
runner.name == 'windows-2022' && | |
runner.arch == 'X86' && | |
matrix.config.compiler_name == 'cl' | |
run: | | |
echo "Installing Microsoft.VisualStudio.Component.WinXP" | |
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer" modify \ | |
--installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" \ | |
--add Microsoft.VisualStudio.Component.WinXP \ | |
--nocache --norestart --quiet | |
echo "Installation of Microsoft.VisualStudio.Component.WinXP finished" | |
- name: Get GitHub Action Cache url and token | |
if: | | |
runner.os == 'Windows' && | |
matrix.config.compiler_name == 'cl' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Setup MSVC env | |
if: | | |
runner.os == 'Windows' && | |
matrix.config.compiler_name == 'cl' | |
run: | | |
cd $VCPKG_INSTALLATION_ROOT | |
echo "vcpkg revision: $(git rev-parse HEAD)" | |
./bootstrap-vcpkg.sh -disableMetrics | |
# For classic mode: | |
# vcpkg integrate install | |
# vcpkg install --triplet=${{ matrix.arch.msvc_triplet }} sdl2 sdl2-mixer[libflac,libmodplug,mpg123,opusfile] sdl2-net libsamplerate | |
- name: Setup Linux env | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update --fix-missing | |
sudo apt-get full-upgrade --fix-missing | |
sudo apt-get install ${{ matrix.config.compiler_name }} gdb ninja-build python3 cmake \ | |
libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev libsamplerate-dev | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure & Build & Test | |
id: configure | |
env: | |
CC: ${{ matrix.config.compiler_name }} | |
run: | | |
export MAKEFLAGS=--keep-going | |
cmake --workflow --preset "${{ matrix.config.cmake_preset }}" | |
git_version=$(cmake -P ./cmake/UpdateRevision.cmake "git" 2>&1) | |
echo "version=$git_version" >> $GITHUB_OUTPUT | |
- name: Install | |
if: | | |
github.repository == 'Russian-Doom/russian-doom' && | |
github.event_name == 'push' && | |
github.ref == 'refs/heads/master' && | |
runner.os == 'Windows' | |
run: | | |
cmake --install build --config RelWithDebInfo --prefix "./build/install" | |
- name: Package Zip | |
if: | | |
github.repository == 'Russian-Doom/russian-doom' && | |
github.event_name == 'push' && | |
github.ref == 'refs/heads/master' && | |
runner.os == 'Windows' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: russian-doom-${{ steps.configure.outputs.version }}-windows-${{ matrix.config.build_suffix }} | |
path: ./build/install/ |