Skip to content

Commit

Permalink
Create initial github actions pipeline for building on windows (#11)
Browse files Browse the repository at this point in the history
* Create initial github actions pipeline for building on windows

* add the build script referenced in the github actions ci pipeline

* comments

* commit something that should fail the uncrustify check just to make sure that the pipelines fail

* Revert "commit something that should fail the uncrustify check just to make sure that the pipelines fail"

This reverts commit 3fee079.

Manually verified that this does indeed fail the build pipeline.

* tell editors to use 2 spaces instead of 4 by default for yaml files
  • Loading branch information
bpkroth authored Aug 21, 2020
1 parent 1f40fca commit 964c302
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
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%

0 comments on commit 964c302

Please sign in to comment.