name: build on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [windows-latest, macos-latest, ubuntu-latest] build_type: [debug] enable_ui: [off] include: - os: ubuntu-latest build_type: debug enable_ui: on steps: - uses: actions/checkout@v2 with: submodules: 'recursive' - uses: seanmiddleditch/gha-setup-ninja@master - uses: ilammy/msvc-dev-cmd@v1 if: runner.os == 'Windows' - name: Install Dependencies shell: bash run: | if [[ "${{ runner.os }}" == "Linux" ]] ; then sudo apt-get update -qq sudo apt-get install -y \ libx11-dev libxcursor-dev libxi-dev fi - name: Generating Makefiles shell: bash run: | cmake -S . -B build -G Ninja \ -DENABLE_TESTS=ON \ -DENABLE_UI=${{ matrix.enable_ui }} - name: Compiling shell: bash run: | cd build && ninja - name: Running C++ Tests shell: bash run: | if [[ "${{ runner.os }}" == "Linux" ]] ; then export XVFB=xvfb-run fi cd build && $XVFB ctest --output-on-failure - name: Running CLI Tests shell: bash run: | if [[ "${{ runner.os }}" == "Linux" ]] ; then export XVFB=xvfb-run fi cd build export ASEPRITE=$PWD/bin/aseprite git clone --recursive https://github.com/aseprite/tests.git cd tests $XVFB bash run-tests.sh