Skip to content

Commit 48d22b3

Browse files
committed
Add Github action workflow
1 parent eb52426 commit 48d22b3

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This file is part of CMake-codecov.
2+
#
3+
# Copyright (c)
4+
# 2015-2020 RWTH Aachen University, Federal Republic of Germany
5+
#
6+
# See the LICENSE file in the package base directory for details
7+
#
8+
# Written by Alexander Haase, alexander.haase@rwth-aachen.de
9+
#
10+
11+
name: CMake-codecov CI
12+
on:
13+
push:
14+
branches: [ master ]
15+
pull_request:
16+
branches: [ master ]
17+
18+
jobs:
19+
build:
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
24+
compiler: [gcc, clang]
25+
exclude:
26+
- os: macos-latest
27+
compiler: gcc
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Install CMake, lcov, gfortran on Linux
34+
if: runner.os == 'Linux'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y cmake lcov gfortran
38+
39+
- name: Install CMake, lcov on macOS
40+
if: runner.os == 'macOS'
41+
run: |
42+
brew update
43+
brew install cmake lcov gfortran
44+
45+
- name: Configure and build
46+
run: |
47+
mkdir build && cd build
48+
cmake .. -DENABLE_COVERAGE=On
49+
make
50+
make gcov lcov test

0 commit comments

Comments
 (0)