Skip to content

Commit 03a5320

Browse files
committed
Added CI
1 parent c030a2f commit 03a5320

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: Release
7+
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
platform:
14+
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", flags: ""}
15+
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", flags: ""}
16+
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", flags: "-A Win32"}
17+
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", flags: "-A x64"}
18+
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", flags: ""}
19+
20+
name: ${{matrix.platform.name}}
21+
runs-on: ${{matrix.platform.os}}
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
with:
27+
submodules: 'recursive'
28+
29+
- name: Setup Linux compiler
30+
if: runner.os == 'Linux'
31+
run: export CXX=${{matrix.platform.compiler}}
32+
33+
- name: Create Build Environment
34+
run: cmake -E make_directory ${{github.workspace}}/build
35+
36+
- name: Configure CMake
37+
shell: bash
38+
working-directory: ${{github.workspace}}/build
39+
run: cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${{matrix.platform.flags}} -DOUP_DO_TEST=1
40+
41+
- name: Build
42+
shell: bash
43+
working-directory: ${{github.workspace}}/build
44+
run: cmake --build . --config ${BUILD_TYPE} --parallel 2
45+
46+
- name: Install
47+
shell: bash
48+
working-directory: ${{github.workspace}}/build
49+
run: cmake --install . --config ${BUILD_TYPE}
50+
51+
- name: Test
52+
shell: bash
53+
working-directory: ${{github.workspace}}/build
54+
run: ctest
55+

.github/workflows/doc.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Doc
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build documentation
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Get dependencies
18+
run: sudo apt-get install doxygen
19+
20+
- name: Build C++ documentation
21+
working-directory: ${{github.workspace}}/doc
22+
shell: bash
23+
run: doxygen dox.conf
24+
25+
- name: Compress
26+
working-directory: ${{github.workspace}}/doc
27+
shell: bash
28+
run: zip docs.zip html/*
29+
30+
- name: Upload as an Artifact
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: docs.zip
34+
path: ${{github.workspace}}/doc/docs.zip

0 commit comments

Comments
 (0)