Skip to content

Refactor meson files. #299

Refactor meson files.

Refactor meson files. #299

Workflow file for this run

name: Build and test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name:
[
ubuntu-22.04-gcc-12,
macos-13-xcode,
]
include:
- name: ubuntu-22.04-gcc-12
os: ubuntu-22.04
compiler: gcc
version: "12"
- name: macos-13-xcode
os: macos-13
compiler: gcc
version: "13"
steps:
- uses: actions/checkout@v2
with:
lfs: "true"
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
echo "name=CC::gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "name=CXX::g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
echo "name=CC::clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "name=CXX::clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
sudo apt-get install libsdl2-dev libpng-dev git-lfs libjpeg-turbo8-dev libeigen3-dev
pip install meson ninja
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
pip3 install meson ninja
brew install freetype libjpeg-turbo cairo libpng sdl2 pkg-config eigen
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.version }}
echo "name=CC::gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "name=CXX::g++-${{ matrix.version }}" >> $GITHUB_ENV
else
ls -ls /Applications/
# sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
echo "name=CC::clang" >> $GITHUB_ENV
echo "name=CXX::clang++" >> $GITHUB_ENV
fi
- name: Build project
run: |
if [ "${{ runner.os }}" = "macOS" ]; then
./configure_mac.sh
else
meson setup build
fi
ninja -C build
- name: Run tests
run: |
ninja -C build test
- name: Upload screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: screenshots-${{ matrix.name}}
path: ./screenshots