-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (59 loc) · 2.17 KB
/
ubuntu_codecov.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
name: Ubuntu CodeCoverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-ubuntu:
strategy:
matrix:
include:
- name: "Ubuntu 20.04 + GCC-9"
os: ubuntu-20.04
compiler: gcc
version: "9"
runs-on: ${{matrix.os}}
name: ${{matrix.name}}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Dependency
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install lcov xorg-dev freeglut3-dev
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install cmake gcc-${{ matrix.version }} g++-${{ matrix.version }}
else
sudo apt-get install cmake clang-${{ matrix.version }} clang++-${{ matrix.version }}
fi
- name: Configure Compiler
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Install vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install cxxopts:x64-linux glad[gl-api-45]:x64-linux glfw3:x64-linux glm:x64-linux imgui:x64-linux tinyobjloader:x64-linux
./vcpkg/vcpkg integrate install
mv vcpkg /home/runner/work/
echo "vcpkg_path=/home/runner/work/vcpkg" >> $GITHUB_ENV
- name: Configure Build
run: |
mkdir build
${{ env.vcpkg_path }}/vcpkg list
cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake -DCUBBYFLOW_INSTALL_DIR=${{ github.workspace }}/Libraries/cubbyflow -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON
- name: Build
run: cd build && make
- name: Run Unit Test
run: /home/runner/work/RenderFlow/RenderFlow/build/bin/UnitTests
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)