satdump/.github/workflows/windows_build.yml
Mark Pentler 4a9bb3f0ce Update windows_build.yml
Remove workflow_dispatch before PR submission - didn't work anyways
2021-08-25 13:16:21 +01:00

61 lines
2.2 KiB
YAML

name: Windows Build
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Clone pre-setup VCPKG
run: git clone https://github.com/Aang23/vcpkg.git --depth 1
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake -G "Visual Studio 16 2019" -DBUILD_MSVC=ON -DBUILD_LIVE=ON -DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake "$Env:GITHUB_WORKSPACE"
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Copy DLLs
working-directory: ${{runner.workspace}}/build
shell: powershell
run: cp $Env:GITHUB_WORKSPACE/vcpkg/installed/x64-windows/bin/*.dll Release
- name: Copy Resources
working-directory: ${{runner.workspace}}/build
shell: powershell
run: cp -r $Env:GITHUB_WORKSPACE/resources Release
- name: Copy Pipelines
working-directory: ${{runner.workspace}}/build
shell: powershell
run: cp -r $Env:GITHUB_WORKSPACE/pipelines ${{runner.workspace}}/build/Release; cp $Env:GITHUB_WORKSPACE/Roboto-Medium.ttf ${{runner.workspace}}/build/Release
- name: Copy Fonts
working-directory: ${{runner.workspace}}/build
shell: powershell
run: cp $Env:GITHUB_WORKSPACE/Roboto-Medium.ttf Release
- name: Upload ZIP
uses: actions/upload-artifact@v2
with:
name: SatDump-Windows_x64_MSVC
path: ${{runner.workspace}}/build/Release/*