Skip to content

Linux Build & Test #401

Linux Build & Test

Linux Build & Test #401

Workflow file for this run

name: Linux Build & Test
# Controls when the action will run.
on:
# Triggers the workflow on all push or pull request events
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
env:
COMPILER: ${{ matrix.compiler }}
TEST_TYPE: ${{ matrix.test_type }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
compiler: ['gcc', 'clang']
test_type: ['short', 'long', 'xlong']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: before_install
run: sudo -H DEBIAN_FRONTEND=noninteractive apt-get update
- name: Workaround for tar not being able to access /var/cache/apt/archives
run: sudo chmod u+s "$(command -v tar)"
# Cache the apt-get packages
- name: Cache apt-get packages
uses: actions/cache@v3
with:
path: /var/cache/apt/archives
key: ${{ matrix.os }}-apt-get-${{ hashFiles('**/apt-get-requirement.txt') }}
# Install the apt-get packages
- name: Install apt-get packages
run: |
cat apt-get-requirement.txt | xargs sudo apt-get -yq --no-install-recommends install
- name: test
env:
CC: ${{ env.COMPILER }}
CI_COVERAGE: 1
run: |
make do-test-cmake
- name: Coveralls Parallel
if: matrix.os != 'ubuntu-20.04' || matrix.compiler != 'clang'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.test_type }}
parallel: true
path-to-lcov: ./digger_lcov/digger.info
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
path-to-lcov: ./digger_lcov/digger.info