2022-10-16 14:18:13 +00:00
|
|
|
name: Ubuntu Latest Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-09-04 22:55:51 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
cmake_compiler: ['-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++', '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++']
|
|
|
|
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
|
|
|
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
2022-10-16 14:18:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: >-
|
2023-09-04 22:55:51 +00:00
|
|
|
bash installdeps; if [ "${{ matrix.compiler }}" = clang ]; then sudo apt -y install clang; fi
|
2022-10-16 14:18:13 +00:00
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
run: >-
|
2023-09-04 22:55:51 +00:00
|
|
|
cmake -B build -G Ninja ${{ matrix.cmake_compiler }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
2022-10-16 14:18:13 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: ninja -C build
|
|
|
|
|
|
|
|
- name: Install
|
|
|
|
run: sudo ninja -C build install
|