Skip to content

Commit 31e5e03

Browse files
authored
add ci build (#157)
1 parent a59c067 commit 31e5e03

File tree

4 files changed

+113
-0
lines changed

4 files changed

+113
-0
lines changed

.github/workflows/linux-clang.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Ubuntu (clang)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
mode: [ Debug, Release ]
14+
cpp_version: [11, 20]
15+
runs-on: ubuntu-22.04
16+
17+
steps:
18+
- name: check out
19+
uses: actions/checkout@v3
20+
21+
- name: configure cmake
22+
run: CXX=clang++ CC=clang cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
23+
24+
- name: build project
25+
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}
26+
27+

.github/workflows/linux-gcc.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Ubuntu (gcc)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
ubuntu_gcc:
11+
strategy:
12+
matrix:
13+
mode: [ Debug, Release ]
14+
cpp_version: [11, 20]
15+
runs-on: ubuntu-22.04
16+
17+
steps:
18+
- name: check out
19+
uses: actions/checkout@v3
20+
21+
- name: checkout gcc version
22+
run: gcc --version
23+
24+
- name: configure cmake
25+
run: CXX=g++ CC=gcc cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
26+
27+
- name: build project
28+
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}

.github/workflows/mac.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: macOS Monterey 12
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
mode: [ Debug, Release ]
14+
cpp_version: [11, 20]
15+
16+
runs-on: macos-12
17+
18+
steps:
19+
- name: check out
20+
uses: actions/checkout@v3
21+
22+
- name: configure cmake
23+
run: CXX=clang++ CC=clang cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
24+
25+
- name: build project
26+
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}
27+

.github/workflows/windows.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Windows Server 2022
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
strategy:
14+
matrix:
15+
mode: [Debug, Release]
16+
cpp_version: [11, 20]
17+
arch: [x64]
18+
19+
env:
20+
CXX: cl.exe
21+
CC: cl.exe
22+
23+
steps:
24+
- name: check out
25+
uses: actions/checkout@v3
26+
27+
- name: generate project
28+
run: cmake -B ${{ github.workspace }}\build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -A${{ matrix.arch }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
29+
30+
- name: build project
31+
run: cmake --build ${{ github.workspace }}\build --config ${{ matrix.mode }}

0 commit comments

Comments
 (0)