You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.6 KiB
52 lines
1.6 KiB
name: build |
|
|
|
on: [push, pull_request] |
|
|
|
jobs: |
|
build: |
|
runs-on: ${{ matrix.os }} |
|
strategy: |
|
matrix: |
|
include: |
|
- os: ubuntu-latest |
|
cc: gcc |
|
cxx: g++ |
|
- os: ubuntu-latest |
|
cc: clang |
|
cxx: clang++ |
|
env: |
|
CC: ${{ matrix.cc }} |
|
CXX: ${{ matrix.cxx }} |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v2 |
|
|
|
- name: Get SDL2 headers |
|
uses: actions/checkout@v2 |
|
with: |
|
repository: libsdl-org/SDL |
|
ref: release-2.0.9 |
|
path: SDL2 |
|
- name: Link SDL2 headers into system path |
|
run: | |
|
sudo ln -s "$GITHUB_WORKSPACE/SDL2/include" /usr/local/include/SDL2 |
|
|
|
- name: Install dependencies |
|
if: startsWith(matrix.os, 'ubuntu') |
|
run: | |
|
sudo apt-get -y install gcc-multilib g++-multilib |
|
|
|
- name: Build with xash3d-fwgs input |
|
run: | |
|
cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" && cmake --build build --target all |
|
- name: Build with goldsource input |
|
run: | |
|
cmake -B build-gs -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON && cmake --build build-gs --target all |
|
|
|
- name: Build with mingw |
|
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc') |
|
run: | |
|
sudo apt-get install -y mingw-w64-i686-dev binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 |
|
cmake -B build-mingw -S . -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ |
|
cmake --build build-mingw --target all |
|
|
|
|