General cleanup of old stuff #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: [ push ] | |
jobs: | |
macos: | |
runs-on: macos-latest | |
if: contains(github.event.head_commit.message, '[skip-ci]') == false | |
strategy: | |
fail-fast: false | |
matrix: | |
CPP_VERSION: [ 17, 20, 23 ] | |
env: | |
VCPKG_ROOT: ${{github.workspace}}/vcpkg | |
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install system dependencies | |
run: | | |
brew install cmake | |
brew install ninja | |
brew install glfw | |
- name: Restore Vcpkg artifacts | |
id: restore-vcpkg-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{env.VCPKG_ROOT}} | |
!${{env.VCPKG_ROOT}}/buildtrees | |
!${{env.VCPKG_ROOT}}/packages | |
!${{env.VCPKG_ROOT}}/downloads | |
!${{env.VCPKG_ROOT}}/installed | |
key: centurion-macos-vcpkg-${{hashFiles('vcpkg.json')}} | |
- name: Install Vcpkg | |
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/microsoft/vcpkg | |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
sudo ./vcpkg/vcpkg integrate install | |
mkdir ${{env.VCPKG_DEFAULT_BINARY_CACHE}} | |
- name: Generate build files | |
run: | | |
mkdir build && cd build | |
cmake .. -GNinja \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_CXX_STANDARD=${{matrix.CPP_VERSION}} \ | |
-DCEN_USE_SYSTEM_DEPS=OFF \ | |
-DCEN_USE_SDL_IMAGE=OFF \ | |
-DCEN_USE_SDL_MIXER=OFF \ | |
-DCEN_USE_SDL_TTF=OFF \ | |
-DCEN_BUILD_TESTS=OFF \ | |
-DCEN_BUILD_EXAMPLES=OFF \ | |
-DCEN_TREAT_WARNINGS_AS_ERRORS=ON | |
- name: Compile | |
run: ninja -C build | |
ubuntu: | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, '[skip-ci]') == false | |
env: | |
VCPKG_ROOT: ${{github.workspace}}/vcpkg | |
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache | |
SDL_VIDEODRIVER: x11 | |
DISPLAY: :99.0 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install system dependencies | |
run: | | |
sudo apt install cmake \ | |
ninja-build \ | |
xvfb \ | |
gnome-desktop-testing \ | |
libasound2-dev \ | |
libpulse-dev \ | |
libaudio-dev \ | |
libjack-dev \ | |
libsndio-dev \ | |
libsamplerate0-dev \ | |
libx11-dev \ | |
libxext-dev \ | |
libxrandr-dev \ | |
libxcursor-dev \ | |
libxfixes-dev \ | |
libxi-dev \ | |
libxss-dev \ | |
libwayland-dev \ | |
libxkbcommon-dev \ | |
libdrm-dev \ | |
libgbm-dev \ | |
libgl1-mesa-dev \ | |
libgles2-mesa-dev \ | |
libegl1-mesa-dev \ | |
libdbus-1-dev \ | |
libibus-1.0-dev \ | |
libudev-dev \ | |
fcitx-libs-dev \ | |
libpipewire-0.3-dev \ | |
libdecor-0-dev \ | |
libfreetype-dev \ | |
fonts-dejavu-core \ | |
libharfbuzz-dev | |
- name: Restore Vcpkg | |
id: restore-vcpkg-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{env.VCPKG_ROOT}} | |
!${{env.VCPKG_ROOT}}/buildtrees | |
!${{env.VCPKG_ROOT}}/packages | |
!${{env.VCPKG_ROOT}}/downloads | |
!${{env.VCPKG_ROOT}}/installed | |
key: centurion-ubuntu-vcpkg-${{hashFiles('vcpkg.json')}} | |
- name: Install Vcpkg | |
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/microsoft/vcpkg | |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
sudo ./vcpkg/vcpkg integrate install | |
mkdir ${{env.VCPKG_DEFAULT_BINARY_CACHE}} | |
- name: Emulate video device | |
run: | | |
/sbin/start-stop-daemon --start \ | |
--pidfile /tmp/custom_xvfb_99.pid \ | |
--make-pidfile \ | |
--background \ | |
--exec /usr/bin/Xvfb -- :99 -screen 0 800x600x24 -ac +extension GLX; | |
sleep 3 | |
- name: Generate build files | |
run: | | |
mkdir build && cd build | |
cmake .. -GNinja \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_CXX_STANDARD=${{matrix.CPP_VERSION}} \ | |
-DCEN_USE_SYSTEM_DEPS=OFF \ | |
-DCEN_USE_SDL_IMAGE=OFF \ | |
-DCEN_USE_SDL_MIXER=OFF \ | |
-DCEN_USE_SDL_TTF=OFF \ | |
-DCEN_BUILD_TESTS=OFF \ | |
-DCEN_BUILD_EXAMPLES=OFF \ | |
-DCEN_TREAT_WARNINGS_AS_ERRORS=ON | |
- name: Compile | |
run: ninja -C build | |
windows: | |
runs-on: windows-latest | |
if: contains(github.event.head_commit.message, '[skip-ci]') == false | |
env: | |
VCPKG_ROOT: ${{github.workspace}}/vcpkg | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: ilammy/msvc-dev-cmd@v1.11.0 | |
- uses: ashutoshvarma/setup-ninja@master | |
with: | |
version: 1.11.1 | |
- name: Print dependency versions | |
run: | | |
cmake --version | |
ninja --version | |
- name: Restore Vcpkg | |
id: restore-vcpkg-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{env.VCPKG_ROOT}} | |
!${{env.VCPKG_ROOT}}\buildtrees | |
!${{env.VCPKG_ROOT}}\packages | |
!${{env.VCPKG_ROOT}}\downloads | |
!${{env.VCPKG_ROOT}}\installed | |
key: centurion-windows-vcpkg-${{hashFiles('vcpkg.json')}} | |
- name: Install Vcpkg | |
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/microsoft/vcpkg | |
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics | |
.\vcpkg\vcpkg integrate install | |
- name: Generate build files | |
run: | | |
mkdir build | |
cd build | |
cmake .. -GNinja ` | |
-DCMAKE_BUILD_TYPE=Debug ` | |
-DCMAKE_CXX_STANDARD=${{matrix.CPP_VERSION}} ` | |
-DCEN_USE_SYSTEM_DEPS=OFF ` | |
-DCEN_USE_SDL_IMAGE=OFF ` | |
-DCEN_USE_SDL_MIXER=OFF ` | |
-DCEN_USE_SDL_TTF=OFF ` | |
-DCEN_BUILD_TESTS=OFF ` | |
-DCEN_BUILD_EXAMPLES=OFF ` | |
-DCEN_TREAT_WARNINGS_AS_ERRORS=ON | |
- name: Compile | |
run: ninja -C build |