forked from libocca/occa
-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (81 loc) · 2.44 KB
/
build.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run:
strategy:
matrix:
include:
- name: (Ubuntu) gcc-8
os: ubuntu-18.04
CC: gcc-8
CXX: g++-8
CXXFLAGS: -Wno-maybe-uninitialized
FC: gfortran-8
GCOV: gcov-8
OCCA_COVERAGE: 1
OCCA_FORTRAN_ENABLED: 1
- name: (Ubuntu) gcc-9
os: ubuntu-18.04
CC: gcc-9
CXX: g++-9
CXXFLAGS: -Wno-maybe-uninitialized
FC: gfortran-9
GCOV: gcov-9
OCCA_COVERAGE: 1
OCCA_FORTRAN_ENABLED: 1
- name: (Ubuntu) clang-6
os: ubuntu-18.04
CC: clang-6.0
CXX: clang++-6.0
CXXFLAGS: -Wno-uninitialized
OCCA_COVERAGE: 0
- name: (Ubuntu) clang-9
os: ubuntu-18.04
CC: clang-9
CXX: clang++-9
CXXFLAGS: -Wno-uninitialized
OCCA_COVERAGE: 0
- name: (MacOS) gcc-9
os: macos-10.15
CC: gcc-9
CXX: g++-9
CXXFLAGS: -Wno-maybe-uninitialized
GCOV: gcov-9
OCCA_COVERAGE: 1
- name: (MacOS) clang
os: macos-10.15
CC: clang
CXX: clang++
CXXFLAGS: -Wno-uninitialized
OCCA_COVERAGE: 0
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
CXXFLAGS: -O3 -Wall -pedantic -Wshadow -Wsign-compare -Wuninitialized -Wtype-limits -Wignored-qualifiers -Wempty-body -Wextra -Wno-unused-parameter -Werror -Wno-strict-aliasing ${{ matrix.CXXFLAGS }}
FC: ${{ matrix.FC }}
GCOV: ${{ matrix.GCOV }}
OCCA_COVERAGE: ${{ matrix.OCCA_COVERAGE }}
OCCA_FORTRAN_ENABLED: ${{ matrix.OCCA_FORTRAN_ENABLED }}
OCCA_CXXFLAGS: -O3
FORTRAN_EXAMPLES: ${{ matrix.OCCA_FORTRAN_ENABLED }}
steps:
- uses: actions/checkout@v2
- name: Compiler info
run: make -j 16 info
- name: Compile library
run: make -j 16
- name: Compile tests
run: make -j 16 tests
- name: Run unit tests
run: ./tests/run_tests
- name: Run examples
run: ./tests/run_examples
- name: Upload code coverage
run: bash <(curl --no-buffer -s https://codecov.io/bash) -x "${GCOV}"
if: ${{ matrix.OCCA_COVERAGE }}