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:
|
2024-04-02 04:02:19 +00:00
|
|
|
build_compiler: [gcc, clang]
|
|
|
|
build_type: [release, debug]
|
|
|
|
build_options: [default, link_off, translations_only, libretro]
|
|
|
|
include:
|
|
|
|
- cmake_compiler: '-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++'
|
|
|
|
build_compiler: gcc
|
|
|
|
- cmake_compiler: '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++'
|
|
|
|
build_compiler: clang
|
|
|
|
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
|
|
|
|
build_type: release
|
|
|
|
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
|
|
|
|
build_type: debug
|
|
|
|
- cmake_options: '-DENABLE_LINK=OFF'
|
|
|
|
build_options: link_off
|
|
|
|
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
|
|
|
|
build_options: translations_only
|
|
|
|
- libretro_build: 'DEBUG=0'
|
|
|
|
build_type: release
|
|
|
|
build_options: libretro
|
|
|
|
- libretro_build: 'DEBUG=1'
|
|
|
|
build_type: debug
|
|
|
|
build_options: libretro
|
2022-10-16 14:18:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the code
|
2024-04-02 04:02:19 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-10-16 14:18:13 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: >-
|
2024-04-02 04:02:19 +00:00
|
|
|
bash installdeps; if [ "${{ matrix.build_compiler }}" = clang ]; then sudo apt -y install clang; fi
|
2022-10-16 14:18:13 +00:00
|
|
|
|
2024-04-02 04:02:19 +00:00
|
|
|
# CMake build
|
|
|
|
- if: matrix.build_options != 'libretro'
|
|
|
|
name: Configure CMake
|
2022-10-16 14:18:13 +00:00
|
|
|
run: >-
|
2023-09-04 22:55:51 +00:00
|
|
|
cmake -B build -G Ninja ${{ matrix.cmake_compiler }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
2024-04-02 04:02:19 +00:00
|
|
|
- if: matrix.build_options != 'libretro'
|
|
|
|
name: Build
|
2022-10-16 14:18:13 +00:00
|
|
|
run: ninja -C build
|
2024-04-02 04:02:19 +00:00
|
|
|
- if: matrix.build_options != 'libretro'
|
|
|
|
name: Install
|
2022-10-16 14:18:13 +00:00
|
|
|
run: sudo ninja -C build install
|
2024-04-02 04:02:19 +00:00
|
|
|
|
|
|
|
# Libretro build
|
|
|
|
- name: Build libretro core
|
|
|
|
if: matrix.build_options == 'libretro'
|
|
|
|
run: make -C src/libretro ${{ matrix.libretro_build }}
|