Skip to content

Unicode paths, Static analysis, Update Libs, Fix typos #959

Unicode paths, Static analysis, Update Libs, Fix typos

Unicode paths, Static analysis, Update Libs, Fix typos #959

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- 'screenshots'
paths:
- '**'
- '!**.md'
- '!doc/**'
- '!schema/**'
- '!api/lua/definition/**'
- '!.github/workflows/**'
- '.github/workflows/test.yaml'
pull_request:
branches-ignore:
- 'screenshots'
paths:
- '**'
- '!**.md'
- '!doc/**'
- '!schema/**'
- '!api/lua/definition/**'
- '!.github/workflows/**'
- '.github/workflows/test.yaml'
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-latest]
shell: [bash]
extra_make_args: [''] # default build
include:
- os: windows-latest
shell: msys2 {0}
extra_make_args: ''
- os: macos-13
shell: bash
# we now require 10.15 by default, but 10.13 should work with an extra dependency
extra_make_args: 'MACOS_DEPLOYMENT_TARGET=10.13'
name: Test ${{ matrix.os }} ${{ matrix.extra_make_args }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Install dependencies (apt)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update -y -qq
sudo apt-get install coreutils build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libgtest-dev
- name: Install dependencies (brew)
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install coreutils SDL2 sdl2_ttf sdl2_image [email protected] googletest || true
- name: Install extra dependencies (brew)
if: ${{ startsWith(matrix.os, 'macos') && contains(matrix.extra_make_args, 'MACOS_DEPLOYMENT_TARGET') }}
run: |
brew install boost || true
- name: Install dependencies (msys2)
if: ${{ startsWith(matrix.os, 'windows') }}
uses: msys2/setup-msys2@v2
with:
release: false
update: true
install: >-
base-devel
coreutils
make
mingw-w64-x86_64-toolchain
mingw64/mingw-w64-x86_64-SDL2
mingw64/mingw-w64-x86_64-SDL2_image
mingw64/mingw-w64-x86_64-SDL2_ttf
mingw64/mingw-w64-x86_64-freetype
mingw64/mingw-w64-x86_64-openssl
mingw64/mingw-w64-x86_64-gtest
p7zip
- name: Fix dependencies (msys2)
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
# static svt-av1 2.3.0-1 lib seems to be currently broken
wget https://quantum-mirror.hu/mirrors/pub/msys2/mingw/mingw64/mingw-w64-x86_64-svt-av1-2.2.1-1-any.pkg.tar.zst
pacman -U --noconfirm mingw-w64-x86_64-svt-av1-2.2.1-1-any.pkg.tar.zst
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure ASAN
if: ${{ startsWith(matrix.os, 'macos-latest') }}
run: |
# see https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow#false-positives
# since we don't build gtest with ASAN, we hit this issue on macos-latest
echo "ASAN_OPTIONS=detect_container_overflow=0" >> $GITHUB_ENV
- name: Build DEBUG
run: make native CONF=DEBUG WITH_ASAN=true ${{ matrix.extra_make_args }} -j4
- name: Run tests
run: make test CONF=DEBUG WITH_ASAN=true ${{ matrix.extra_make_args }} -j4