mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 19:55:23 +00:00
2d4d82d469
use ninja for Linux builds, fixes missing Linux artifacts on CI
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: Descent 3 Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- {runner: windows-latest, preset: win}
|
|
- {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
|
|
- {runner: ubuntu-latest, preset: linux}
|
|
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 dpkg --add-architecture i386
|
|
sudo apt update
|
|
sudo apt install -y --no-install-recommends \
|
|
ninja-build make cmake g++ libsdl1.2-dev libsdl-image1.2-dev libncurses-dev \
|
|
libxext6:i386 # for ./scripts/hogutils/hogUtils-i686 binary
|
|
mkdir ~/Descent3
|
|
|
|
- name: Configure CMake
|
|
run: cmake --preset ${{ matrix.os.preset }} -B ${{ github.workspace }}/build
|
|
|
|
- name: Build
|
|
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build_${{ matrix.os.runner }}_${{ matrix.build_type }}
|
|
path: ${{ github.workspace }}/build/Descent3/${{ matrix.build_type }}
|