Skip to content

Merge pull request #7 from Stradek/Stradek-patch-1 #34

Merge pull request #7 from Stradek/Stradek-patch-1

Merge pull request #7 from Stradek/Stradek-patch-1 #34

Workflow file for this run

name: Build Windows
env:
BUILD_DIR: "build/"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
configure:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Remove build directory files
run: |
$buildDir = $env:BUILD_DIR
if (Test-Path $buildDir)
{
Remove-Item $buildDir -Recurse -Force
}
- name: Configure CMake
run: cmake -G "Visual Studio 17 2022" -B $env:BUILD_DIR
- name: Save build directory
uses: actions/upload-artifact@v3
with:
name: build
path: ${{ env.BUILD_DIR }}
build:
needs: configure
runs-on: windows-latest
strategy:
matrix:
configuration: [Release, Debug]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Remove build directory if exists
run: |
$buildDir = $env:BUILD_DIR
if (Test-Path $buildDir)
{
Remove-Item $buildDir -Recurse -Force
}
- name: Retrieve build directory
uses: actions/download-artifact@v3
with:
name: build
path: ${{ env.BUILD_DIR }}
- name: Build ${{matrix.target}} (${{matrix.configuration}})
run: cmake --build $env:BUILD_DIR --config ${{matrix.configuration}}