Fix coveralls? #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 lcov | |
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTS=ON -DWITH_COVERAGE=ON | |
- plat: windows-latest | |
triplet: x64-windows | |
csharp: '' | |
aptautoconf: echo "Not Applicable" | |
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_VCPKG=ON -DWITH_TESTS=ON -DWITH_COVERAGE=OFF | |
- plat: macos-latest | |
triplet: x64-osx | |
csharp: mono | |
aptautoconf: echo "Not Applicable" | |
cmakeflags: -DCMAKE_BUILD_TYPE=Debug -DWITH_VCPKG=ON -DWITH_TESTS=ON -DWITH_COVERAGE=OFF | |
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 | |
if: env.VCPKG_DEFAULT_TRIPLET != 'x64-linux' | |
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/github-action@v2.2.3 | |
with: | |
file: ./coverage.info |