Skip to content

Commit

Permalink
improve: add github actions workflow for windows build
Browse files Browse the repository at this point in the history
With this, we will be able to verify that the compilation is working during the opening of the pull request.
  • Loading branch information
dudantas committed Mar 27, 2023
1 parent fd77aa4 commit 12a07c4
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Build - Windows

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
- master

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'

jobs:
job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
buildtype: [Release, Debug]
include:
- os: windows-2022
triplet: x64-windows
packages: >
sccache
steps:
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

- name: Checkout repository
uses: actions/checkout@v2

- name: Install vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg integrate install
- name: Build project
run: msbuild.exe /p:VcpkgEnableManifest=true vcproj/RME.sln
19 changes: 15 additions & 4 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
{
{
"configurations": [
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"configurationType": "Release",
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
Expand Down
12 changes: 12 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "remeres",
"version-string": "1.0.0",
"dependencies": [
"asio",
"freeglut",
"nlohmann-json",
"fmt",
"wxwidgets",
"opengl"
]
}

0 comments on commit 12a07c4

Please sign in to comment.