Skip to content

Merge branch 'TeeworldsBotLib:master' into master #4

Merge branch 'TeeworldsBotLib:master' into master

Merge branch 'TeeworldsBotLib:master' into master #4

Workflow file for this run

name: Test
on:
push:
pull_request:
merge_group:
jobs:
test-cmake:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, ubuntu-20.04]
include:
- os: ubuntu-latest
cmake-init-env: CXXFLAGS=-Werror
- os: ubuntu-20.04
cmake-path: /usr/bin/
cmake-init-env: CXXFLAGS=-Werror
- os: macOS-latest
cmake-init-env: CXXFLAGS=-Werror
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Prepare Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install -y pkg-config cmake cmake build-essential
- name: Prepare macOS
if: contains(matrix.os, 'macOS')
run: |
brew update || true
brew install pkg-config cmake || true
sudo rm -rf /Library/Developer/CommandLineTools
- name: Build in debug mode
run: |
mkdir debug
cd debug
${{ matrix.cmake-path }}cmake -E env ${{ matrix.cmake-init-env }} ${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DTWBL_DEBUG=ON ..
${{ matrix.cmake-path }}cmake --build . --config Debug ${{ matrix.build-args }}
- name: Run tests in debug mode
run: |
cd debug
${{ matrix.cmake-path }}cmake --build . --target test ${{ matrix.build-args }}