Skip to content

Gridview

Gridview #1532

Workflow file for this run

name: build
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-win:
runs-on: [windows-latest]
env:
SDL2_URL: "https://www.libsdl.org/release/SDL2-devel-2.0.14-VC.zip"
SDL2_TTF_URL: "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip"
SDL2_PATH: "C:\\SDL"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install requests
run: pip install requests
- name: Install SDL2
run: python .github/workflows/win_sdl2.py
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PREFIX_PATH="C:\SDL\SDL2-2.0.14;C:\SDL\SDL2_ttf-2.0.15"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-macos:
runs-on: [macos-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
# https://github.com/dotnet/runtime/issues/82240
# temporarily install pkg-config via brew
- name: Install pkg-config
run: |
# brew update
brew install pkg-config
# brew upgrade
# - name: Install sdl
# run: brew install sdl2
# - name: Install sdl2_ttf
# run: brew install sdl2_ttf
# - name: Install updated ncurses
# run: brew install ncurses
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PREFIX_PATH=/usr/local/Cellar/ncurses/6.2
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
build-ubuntu:
runs-on: [ubuntu-latest]
env:
CC: gcc-10
CXX: g++-10
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Update
run: sudo apt-get update -y
- name: Install SDL2
run: sudo apt-get install libsdl2-dev -y
- name: Install SDL2ttf
run: sudo apt-get install libsdl2-ttf-dev -y
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# Currently turned off because of the SDL implicit memory leaks
# Maybe one day we can remove SDL leaks to get actually useful output out of it
# valgrind-test:
# # this could probably use the results of build-ubuntu
# # but I don't know how to do that yet
# runs-on: [ubuntu-latest]
# env:
# TERM: xterm-256color
# steps:
# - uses: actions/checkout@v2
# - name: Install valgrind
# run: sudo apt install valgrind -y
# - name: Setup test script
# run: chmod +x ./.github/workflows/run_valgrind.sh
# - name: Install SDL2
# run: sudo apt-get install libsdl2-dev -y
# - name: Install SDL2ttf
# run: sudo apt-get install libsdl2-ttf-dev -y
# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# - name: Build
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# - name: Run under valgrind
# run: ./.github/workflows/run_valgrind.sh