Skip to content

Commit

Permalink
Added GitHub actions for CI builds
Browse files Browse the repository at this point in the history
These build the default project configuration across a selection of common
platform and tool versions.
  • Loading branch information
simonowen committed Sep 1, 2022
1 parent b008011 commit 502015b
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux CI

on: [workflow_dispatch, push, pull_request]

jobs:
build:
runs-on: ${{matrix.os}}

strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-20.04 ]
compiler:
- { cc: "gcc", cxx: "g++" }
- { cc: "clang", cxx: "clang++" }

steps:
- uses: actions/checkout@v3

- name: Configure
run: cmake -B ${{github.workspace}}/build
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}

- name: Build
run: cmake --build ${{github.workspace}}/build
env:
MAKEFLAGS: "-j2"
22 changes: 22 additions & 0 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: macOS CI

on: [workflow_dispatch, push, pull_request]

jobs:
build:
runs-on: ${{matrix.os}}

strategy:
matrix:
os: [ macos-12, macos-11, macos-10.15 ]

steps:
- uses: actions/checkout@v3

- name: Configure
run: cmake -B ${{github.workspace}}/build

- name: Build
run: cmake --build ${{github.workspace}}/build
env:
MAKEFLAGS: "-j3"
29 changes: 29 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Windows CI

on: [workflow_dispatch, push, pull_request]

jobs:
build:
runs-on: windows-2022

strategy:
matrix:
config:
- { vs: "17 2022", arch: "Win32", triplet: "x86-windows" }
- { vs: "17 2022", arch: "x64", triplet: "x64-windows" }

steps:
- uses: actions/checkout@v3

- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: ${{matrix.config.arch}}

- name: Configure
shell: cmd
run: cmake -B ${{github.workspace}}/build -G "Visual Studio ${{matrix.config.vs}}" -A "${{matrix.config.arch}}"

- name: Build
shell: cmd
run: cmake --build ${{github.workspace}}/build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.*
!.gitignore
!.travis.yml
!.github
Thumbs.db
/out
/CMakeSettings.json
Expand Down

0 comments on commit 502015b

Please sign in to comment.