forked from boostorg/ublas
-
Notifications
You must be signed in to change notification settings - Fork 2
91 lines (74 loc) · 3.15 KB
/
linux_gcc.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
# Copyright (c) 2020 Mohammad Ashar Khan
# Distributed under Boost Software License, Version 1.0
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
name: Linux GCC Debug
# Trigger on Push to the repository, regardless of the branch.
# For fine tune, You can add specific branches or tags.
on: [push, pull_request]
jobs:
build:
name: "${{matrix.config.cxx}} -std=c++${{matrix.config.cxxstd}}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
# If any compiler fails to compile, continue CI for next compiler in matrix instead of failing early
matrix:
config:
- {cc: gcc-7, cxx: g++-7, cxxstd: 11}
- {cc: gcc-8, cxx: g++-8, cxxstd: 11}
- {cc: gcc-9, cxx: g++-9, cxxstd: 11}
- {cc: gcc-10, cxx: g++-10, cxxstd: 11}
- {cc: gcc-7, cxx: g++-7, cxxstd: 17}
- {cc: gcc-8, cxx: g++-8, cxxstd: 17}
- {cc: gcc-9, cxx: g++-9, cxxstd: 17}
- {cc: gcc-10, cxx: g++-10, cxxstd: 17}
- {cc: gcc-10, cxx: g++-10, cxxstd: 2a}
steps:
- uses: actions/checkout@v2
- name: Install GCC-10
if: matrix.config.cxx == 'g++-10'
run: |
sudo apt update
sudo apt-get install -y g++-10
- name: Prepare BOOST_ROOT
run: |
cd ${GITHUB_WORKSPACE}
cd ..
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init --depth=1 --jobs 8 tools/build
git submodule update --init --depth=1 --jobs 8 libs/config
git submodule update --init --depth=1 --jobs 8 tools/boostdep
mkdir -p libs/numeric/
cp -rp ${GITHUB_WORKSPACE}/. libs/numeric/ublas
python tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas
./bootstrap.sh
./b2 -j 8 headers
echo ::set-env name=BOOST_ROOT::${PWD}
- name: Prepare Build
run: |
echo $BOOST_ROOT
cd $BOOST_ROOT
echo "using gcc : : ${{ matrix.config.cxx }} ;" >> ~/user-config.jam;
- name: Test Benchmarks
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 benchmarks toolset=gcc cxxstd=${{matrix.config.cxxstd}}
- name: Test Tensor Examples
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 examples/tensor toolset=gcc cxxstd=${{matrix.config.cxxstd}} cxxflags="-O0"
- name: Test Tensor
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 test/tensor toolset=gcc cxxstd=${{matrix.config.cxxstd}} cxxflags="-O0 -g --coverage" linkflags="--coverage"
- name: Report Code coverage
if: matrix.config.cxxstd == '17' && matrix.config.cxx == 'g++-9'
run: |
${GITHUB_WORKSPACE}/.ci/report_coverage.sh
curl -s https://codecov.io/bash > cov.sh
chmod +x cov.sh
./cov.sh -f coverage.info || echo "Codecov did not collect coverage reports"