Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create initial github actions pipeline for building on windows #11

Merged
merged 6 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ end_of_line = lf

[{CMakeLists.txt,*.cmake}]
end_of_line = lf

[*.yml]
indent_size = 2
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
windows-msbuild-debug:
name: Run debug msbuild on Windows
runs-on: windows-2019

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run debug msbuild
shell: cmd
run: |
set Configuration=Debug
scripts\build.windows.cmd
windows-msbuild-release:
name: Run release msbuild on Windows
runs-on: windows-2019

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run release msbuild
shell: cmd
run: |
set Configuration=Release
scripts\build.windows.cmd
18 changes: 18 additions & 0 deletions scripts/build.windows.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@echo off
rem Build script for Windows. Used in Github Actions for continuous integration checks.
rem Note: "set Configuration={Release or Debug}" to switch the build type.

rem Move to the root of the repo.
pushd "%~dp0\.."

rem Setup the build environment.
call .\scripts\init.windows.cmd

rem Make style check failures fail the build.
set UncrustifyAutoFix=false

rem Build all .vcxproj and .csproj files listed in the various dirs.proj files.
rem Note: This also includes running unit tests.
msbuild /m /r dirs.proj

exit /B %ERRORLEVEL%