change workflows #9
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-2022 | |
name: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check CMake version | |
run: cmake --version | |
- name: Setup MSVC environment | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
- name: Set up vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
cd vcpkg | |
.\bootstrap-vcpkg.bat | |
.\vcpkg install drogon[core,ctl,orm,mysql]:x64-windows | |
.\vcpkg install opencv:x64-windows | |
echo "VCPKG_ROOT=$(pwd)" >> $GITHUB_ENV | |
echo VCPKG_ROOT | |
- name: "Check Directory" | |
run: echo VCPKG_ROOT | |
- name: Setup vcpkg toolchain | |
run: cmake -D CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT CMAKE_BUILD_TYPE=Release -S. -Bbuild -G Ninja | |
- name: Build 64bit release Executable | |
run: cmake --build ./build --config Release --target Gaboot -- | |
- name: Check if Executable got built | |
run: if (-Not (Test-Path -path "build/Gaboot.exe")) {throw 1} | |
- name: Rename Executable to Gaboot-dev-{GITHUB_SHA}.exe | |
run: | | |
del Gaboot-dev-*.exe | |
ren Gaboot.exe Gaboot-dev-${{github.sha}}.exe | |
working-directory: build/ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binary | |
path: build/Gaboot-dev-*.exe |