Skip to content

Update CMake presets and use newer vcpkg baseline #98

Update CMake presets and use newer vcpkg baseline

Update CMake presets and use newer vcpkg baseline #98

Workflow file for this run

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
name: ci
jobs:
build_opengl_backend:
name: OpenGL
strategy:
fail-fast: false
matrix:
window_toolkit: [glfw3, sdl2]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
- name: Configure and Build
env:
FG_TOOLKIT: ${{ matrix.window_toolkit }}
run: |
mkdir build && cd build
cmake `
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="$env:GITHUB_WORKSPACE\scripts\buildsystems\vcpkg.cmake" `
-DFG_USE_WINDOW_TOOLKIT:STRING=$Env:FG_TOOLKIT ..
cmake --build . --parallel --target ALL_BUILD --config Release
cmake --build . --parallel --target INSTALL --config Release
cpack -G NSIS64 -C Release
- name: Upload release binary
if: matrix.window_toolkit == 'glfw3' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REF: ${{ github.ref }}
run: |
$tokens = $env:GITHUB_REF -split "/"
$tag = $tokens[2]
$ver = $tag.substring(1)
gh release upload $tag ./build/Forge-$ver.exe --clobber