ci: use matrix, disable macos for now

Change CI actions to a matrix with cmake options, for both release and
debug builds, with ENABLE_LINK=OFF and ENABLE_SDL=ON configurations, for
all 3 runners.

Also add both g++ and clang++ to the matrix for the Ubuntu runner to
test on clang.

Disable the macOS workflow for now because brew is failing to install
dependencies.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-09-04 22:55:51 +00:00
parent 0f4ec57557
commit f6e3daf9d8
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
3 changed files with 51 additions and 46 deletions

View File

@ -1,8 +1,13 @@
name: macOS Latest Build
on: [push, pull_request]
#on: [push, pull_request]
on: workflow_dispatch
jobs:
build:
strategy:
matrix:
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
runs-on: macos-latest
steps:
@ -17,7 +22,7 @@ jobs:
- name: Configure
run: >-
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake -B build -G Ninja ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Build
run: ninja -C build

View File

@ -3,6 +3,10 @@ on: [push, pull_request]
jobs:
build:
strategy:
matrix:
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
runs-on: windows-latest
env:
MSYSTEM: CLANG64
@ -20,20 +24,12 @@ jobs:
with:
msystem: CLANG64
update: true
install: >-
mingw-w64-clang-x86_64-toolchain
mingw-w64-clang-x86_64-pkgconf
mingw-w64-clang-x86_64-ffmpeg
mingw-w64-clang-x86_64-FAudio
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja
mingw-w64-clang-x86_64-wxWidgets3.2
mingw-w64-clang-x86_64-sfml
mingw-w64-clang-x86_64-SDL2
zip
- name: Install deps
run: >-
bash installdeps
- name: Configure
run: >-
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVBAM_STATIC=ON -DENABLE_SSP=ON -DENABLE_ONLINEUPDATES=OFF
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Build
run: ninja -C build

View File

@ -3,8 +3,12 @@ on: [push, pull_request]
jobs:
build:
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']
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
@ -13,11 +17,11 @@ jobs:
- name: Install Dependencies
run: >-
bash installdeps
bash installdeps; if [ "${{ matrix.compiler }}" = clang ]; then sudo apt -y install clang; fi
- name: Configure
run: >-
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake -B build -G Ninja ${{ matrix.cmake_compiler }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
- name: Build
run: ninja -C build