2024-04-16 18:09:30 +00:00
|
|
|
name: Descent 3 Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-04-17 22:44:21 +00:00
|
|
|
branches: [ "main" ]
|
2024-04-16 18:09:30 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-04-17 18:46:40 +00:00
|
|
|
os:
|
|
|
|
- {runner: windows-latest, preset: win}
|
2024-04-18 07:12:48 +00:00
|
|
|
- {runner: macos-12, preset: mac} # This is supposed to be Intel for now, and what macos-latest is defaulting to for some reason (as of 04/2024)
|
|
|
|
- {runner: macos-14, preset: mac} # This is supposed to be M1
|
2024-04-17 18:46:40 +00:00
|
|
|
- {runner: ubuntu-latest, preset: linux}
|
2024-04-16 18:09:30 +00:00
|
|
|
|
2024-04-17 02:08:32 +00:00
|
|
|
runs-on: ${{ matrix.os.runner }}
|
2024-04-16 18:09:30 +00:00
|
|
|
|
|
|
|
steps:
|
2024-04-17 22:48:51 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-04-16 18:09:30 +00:00
|
|
|
|
2024-04-17 22:48:51 +00:00
|
|
|
- name: Install macOS dependencies
|
|
|
|
if: ${{ matrix.os.preset == 'mac' }}
|
|
|
|
run: |
|
|
|
|
# Install packages from Homebrew
|
|
|
|
brew bundle install
|
2024-04-17 02:12:59 +00:00
|
|
|
|
2024-04-17 23:00:35 +00:00
|
|
|
- name: Install Linux dependencies
|
|
|
|
if: ${{ matrix.os.preset == 'linux' }}
|
|
|
|
run: |
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y --no-install-recommends \
|
2024-04-21 12:56:32 +00:00
|
|
|
ninja-build cmake g++ libsdl1.2-dev libsdl-image1.2-dev libncurses-dev \
|
2024-04-17 23:00:35 +00:00
|
|
|
libxext6:i386 # for ./scripts/hogutils/hogUtils-i686 binary
|
|
|
|
mkdir ~/Descent3
|
|
|
|
|
2024-04-17 22:48:51 +00:00
|
|
|
- name: Configure CMake
|
2024-04-20 06:47:09 +00:00
|
|
|
run: cmake --preset ${{ matrix.os.preset }}
|
2024-04-16 18:09:30 +00:00
|
|
|
|
2024-04-21 03:10:06 +00:00
|
|
|
- name: Debug Build
|
|
|
|
run: cmake --build --preset ${{ matrix.os.preset }} --config Debug
|
|
|
|
|
|
|
|
- name: Release Build
|
|
|
|
run: cmake --build --preset ${{ matrix.os.preset }} --config Release
|
2024-04-16 18:09:30 +00:00
|
|
|
|
2024-04-17 22:48:51 +00:00
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-04-21 03:10:06 +00:00
|
|
|
name: build_${{ matrix.os.runner }}
|
|
|
|
path: |
|
|
|
|
${{ github.workspace }}/builds/${{ matrix.os.preset }}/Descent3/Debug/
|
|
|
|
${{ github.workspace }}/builds/${{ matrix.os.preset }}/Descent3/Release/
|