-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (56 loc) · 1.72 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Linux Build & Test
on:
push:
branches: [ "main" ]
jobs:
build:
name: ${{matrix.NAME}}
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "On"
NAME: "g++9.3 Release Dynamic x64"
CC: "gcc"
CXX: "g++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "Off"
NAME: "g++9.3 Release Static x64"
CC: "gcc"
CXX: "g++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "On"
NAME: "clang 10.0 Release Dynamic x64"
CC: "clang"
CXX: "clang++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "Off"
NAME: "clang 10.0 Release Static x64"
CC: "clang"
CXX: "clang++"
steps:
- uses: actions/checkout@v3
- name: Create Working directory
run: mkdir -p build
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.1'
- name: CMake Generation
working-directory: ${{github.workspace}}/build
run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DOPENKIT_BUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_SHARED_LIBS=${{matrix.BUILD_SHARED_LIBS}} .. || exit 1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.BUILD_TYPE}} --timeout 600 --output-on-failure
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}