mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-23 12:08:56 +00:00
95caa7b6c3
This type of console is enabled only with `-svgalib` and `-dedicated` options. Since there no svgalib direct support (which is pretty old and too specific to Linux tech), it's better completely remove this code for simplicity and reducing external dependencies. Removed `-svgalib` option as unused now.
98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
name: Descent 3 Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '**/README.md'
|
|
- '**/LICENSE'
|
|
- '**/.github/**'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '**/README.md'
|
|
- '**/LICENSE'
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.os.runner }}, ${{ matrix.os.cxx }}, ${{ matrix.build_type }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- runner: windows-latest
|
|
preset: win32
|
|
cc: cl
|
|
cxx: cl
|
|
name: Windows-x86
|
|
- runner: windows-latest
|
|
preset: win64
|
|
cc: cl
|
|
cxx: cl
|
|
name: Windows-x64
|
|
- runner: macos-12 # This is supposed to be Intel for now, and what macos-latest is defaulting to for some reason (as of 04/2024)
|
|
preset: mac
|
|
cc: cc
|
|
cxx: c++
|
|
name: macOS-Intel
|
|
- runner: macos-14 # This is supposed to be M1
|
|
preset: mac
|
|
cc: cc
|
|
cxx: c++
|
|
name: macOS-ARM
|
|
- runner: ubuntu-latest
|
|
preset: linux
|
|
cc: gcc
|
|
cxx: g++
|
|
name: Linux-x64
|
|
- runner: ubuntu-latest
|
|
preset: linux
|
|
cc: clang
|
|
cxx: clang++
|
|
name: Linux-x64-clang
|
|
build_type:
|
|
- Debug
|
|
- Release
|
|
|
|
runs-on: ${{ matrix.os.runner }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install macOS dependencies
|
|
if: ${{ matrix.os.preset == 'mac' }}
|
|
run: |
|
|
# Install packages from Homebrew
|
|
brew bundle install
|
|
|
|
- name: Install Linux dependencies
|
|
if: ${{ matrix.os.preset == 'linux' }}
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y --no-install-recommends \
|
|
ninja-build cmake g++ libgtest-dev libsdl2-dev zlib1g-dev libspdlog-dev
|
|
|
|
- name: Configure CMake
|
|
env:
|
|
CC: ${{ matrix.os.cc }}
|
|
CXX: ${{ matrix.os.cxx }}
|
|
VCPKG_ROOT: C:/vcpkg
|
|
run: cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON
|
|
|
|
- name: Build ${{ matrix.build_type }}
|
|
run: cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose
|
|
|
|
- name: Run ${{ matrix.build_type }} Unittests
|
|
run: ctest --preset ${{ matrix.os.preset }} -C ${{ matrix.build_type }}
|
|
|
|
- name: Local install
|
|
# There no cmake install presets so install in traditional way
|
|
run: cmake --install builds/${{ matrix.os.preset }}/ --config ${{ matrix.build_type }}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Descent3_${{ matrix.build_type }}_${{ matrix.os.name }}
|
|
path: ${{ github.workspace }}/builds/${{ matrix.os.preset }}/installed/
|