Skip to content

Commit

Permalink
added windows cmake actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
strangesast committed Nov 30, 2020
1 parent 9ae951c commit ffb2d8f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CMake

on: [push]
on:
push:
paths:
- '.github/workflows/cmake.yml'
- 'example/**'

env:
BUILD_TYPE: Release
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/windows-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Windows CMake

on:
push:
paths:
- '.github/workflows/windows-cmake.yml'
- 'example/**'

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Submodules & Dependencies
run: |
git submodule update --init --recursive
cd example/extern/libconfig
mkdir build
cd build
cmake -A Win32 ..
cmake --build . --config Release
- name: Create Build Environment
shell: powershell
run: cmake -E make_directory ${{runner.workspace}}/example/build

- name: Configure CMake
working-directory: ${{runner.workspace}}/example/build
shell: powershell
run: cmake -A Win32 -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE $env:GITHUB_WORKSPACE/example

- name: Build
working-directory: ${{runner.workspace}}/example/build
shell: powershell
run: cmake --build . --config $env:BUILD_TYPE

- name: Test
working-directory: ${{runner.workspace}}/example/build
shell: powershell
run: ctest -V -C $env:BUILD_TYPE

0 comments on commit ffb2d8f

Please sign in to comment.