Skip to content

Add coveralls step #102

Add coveralls step

Add coveralls step #102

Workflow file for this run

name: Build and Unit Tests
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
plat: [ubuntu-latest, windows-latest, macos-latest]
include:
- plat: ubuntu-latest
triplet: x64-linux
csharp: mono
aptautoconf: sudo apt-get install -y autoconf-archive libicu-dev doctest-dev
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTS=ON
- plat: windows-latest
triplet: x64-windows
csharp: ''
aptautoconf: echo "Not Applicable"
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_VCPKG=ON -DWITH_TESTS=ON
- plat: macos-latest
triplet: x64-osx
csharp: mono
aptautoconf: echo "Not Applicable"
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_VCPKG=ON -DWITH_TESTS=ON
runs-on: ${{ matrix.plat }}
continue-on-error: true
env:
VCPKG_BINARY_SOURCES: clear;nuget,GitHub,readwrite
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup NuGet credentials for vcpkg binary-caching
shell: bash
run: >
${{ matrix.csharp }} `vcpkg fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
-storepasswordincleartext
-name "GitHub"
-username "${{ github.repository_owner }}"
-password "${{ secrets.GITHUB_TOKEN }}"
- name: Install Autoconf Macros
run: ${{ matrix.aptautoconf }}
- name: Run CMake generator
run: cmake . -B build ${{ matrix.cmakeflags }}
- name: Build project
run: cmake --build build --config Debug
- name: Run unit tests
run: build/bin/tvm_spec
- name: Set up coverage
if: env.VCPKG_DEFAULT_TRIPLET == 'x64-linux'
run: cd build && make coverage
- name: Coveralls
if: env.VCPKG_DEFAULT_TRIPLET == 'x64-linux'
uses: coverallsapp/[email protected]