- add logging #16
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: | |
paths: | |
- '.github/workflows/**' | |
- 'CMakeLists.txt' | |
- 'DGEngine.core/**' | |
- 'DGEngine.core/CMakeLists.txt' | |
- 'src/**' | |
- 'test/**' | |
pull_request: | |
paths: | |
- '.github/workflows/**' | |
- 'CMakeLists.txt' | |
- 'DGEngine.core/**' | |
- 'DGEngine.core/CMakeLists.txt' | |
- 'src/**' | |
- 'test/**' | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
jobs: | |
build_linux: | |
name: linux build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Columns | |
uses: actions/checkout@v4 | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Install Ubuntu dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev | |
version: 1.0 | |
execute_install_scripts: true | |
- name: Install dependencies | |
run: | | |
vcpkg install physfs sfml --triplet=x64-linux | |
- name: Setup Ninja Build | |
uses: turtlesec-no/get-ninja@main | |
- name: CMake build Columns | |
run: | | |
export CC=/usr/bin/gcc-11 | |
export CXX=/usr/bin/g++-11 | |
cmake --preset linux-x64-debug-vcpkg -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake | |
cmake --build --preset linux-x64-debug-vcpkg | |
build_windows: | |
name: windows build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Columns | |
uses: actions/checkout@v4 | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Install dependencies | |
run: vcpkg install physfs sfml --triplet=x64-windows | |
- name: Setup MSVC | |
uses: TheMrMilchmann/setup-msvc-dev@v2 | |
with: | |
arch: x64 | |
- name: Setup Ninja Build | |
uses: turtlesec-no/get-ninja@main | |
- name: CMake build Columns | |
run: | | |
cmake --preset windows-x64-debug -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | |
cmake --build --preset windows-x64-debug |