Merge pull request #31 from shad0wshayd3-FO4/dev-write-func #1
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: Main CI | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- '.github/workflows/main_ci.yml' | |
- 'cmake/**' | |
- 'include/**' | |
- 'src/**' | |
- 'CMakeLists.txt' | |
- 'CMakePresets.json' | |
- 'vcpkg.json' | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Debug | |
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-cache | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: main | |
- name: Setup vcpkg | |
run: | | |
mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
cd $env:VCPKG_INSTALLATION_ROOT | |
./bootstrap-vcpkg.bat | |
./vcpkg --version > ${{ github.workspace }}/vcpkg-version.txt | |
- name: Cache vcpkg | |
uses: actions/cache@v2 | |
id: vcpkg-cache | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('main/**/vcpkg.json', 'vcpkg-version.txt') }} | |
- name: Configure CMake | |
working-directory: ${{ github.workspace }}/main | |
run: cmake --preset vs2022-windows-vcpkg | |
- name: Build | |
working-directory: ${{ github.workspace }}/main | |
run: cmake --build build --config ${{ env.BUILD_TYPE }} |