Hopefully OS X Clang build fix #181
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: | |
- "master" | |
tags: | |
- "*" | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: | |
- "master" | |
paths-ignore: | |
- "**.md" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
defaults: | |
run: | |
shell: ${{ matrix.config.shell }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Linux GCC | |
os: ubuntu-latest | |
compiler: gcc | |
shell: bash | |
- name: macOS Clang | |
os: macos-latest | |
compiler: clang | |
shell: bash | |
artifacts: true | |
pkg-path: pkg/osx/*.dmg | |
pkg-dir: pkg/osx | |
- name: MSYS2 UCRT64 | |
os: windows-latest | |
compiler: gcc | |
shell: 'msys2 {0}' | |
msystem: ucrt64 | |
msys-env: mingw-w64-ucrt-x86_64 | |
artifacts: true | |
pkg-path: pkg/win32/*.zip | |
pkg-dir: pkg/win32 | |
- name: MSYS2 MINGW32 | |
os: windows-latest | |
compiler: gcc | |
shell: 'msys2 {0}' | |
msystem: mingw32 | |
msys-env: mingw-w64-i686 | |
artifacts: true | |
pkg-path: pkg/win32/*.zip | |
pkg-dir: pkg/win32 | |
steps: | |
- name: Install pandoc | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: choco install pandoc | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
libsdl2-dev \ | |
libsdl2-mixer-dev \ | |
libsdl2-net-dev \ | |
libpng-dev \ | |
libsamplerate0-dev \ | |
libfluidsynth-dev | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install \ | |
automake \ | |
dylibbundler \ | |
sdl2 \ | |
sdl2_mixer \ | |
sdl2_net \ | |
libpng \ | |
libsamplerate \ | |
fluid-synth | |
- name: Install dependencies (MSYS2) | |
if: runner.os == 'Windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.config.msystem }} | |
update: true | |
path-type: inherit | |
install: >- | |
autotools | |
zip | |
${{ matrix.config.msys-env }}-gcc | |
${{ matrix.config.msys-env }}-SDL2 | |
${{ matrix.config.msys-env }}-SDL2_mixer | |
${{ matrix.config.msys-env }}-SDL2_net | |
${{ matrix.config.msys-env }}-libpng | |
${{ matrix.config.msys-env }}-libsamplerate | |
${{ matrix.config.msys-env }}-fluidsynth | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Configure | |
env: | |
CC: ${{ matrix.config.compiler }} | |
run: | | |
./autogen.sh | |
- name: Build true-color on Windows | |
if: runner.os == 'Windows' | |
run: | | |
make distclean | |
./configure --enable-truecolor | |
make -j4 | |
mv src/so-doom.exe src/so-doom-truecolor.exe | |
make distclean | |
./configure | |
- name: Build | |
run: make -j4 | |
- name: Test | |
run: | | |
PREFIX=`sed -n '/PROGRAM_PREFIX/p' ${PWD}/config.h | cut -d '"' -f 2` | |
make -j4 -C quickcheck check SOURCE_PORT=$PWD/src/${PREFIX}doom | |
- name: Package | |
if: ${{ matrix.config.artifacts }} | |
run: | | |
cd ${{ matrix.config.pkg-dir }} | |
make |