Skip to content

Enable self-hosted runners #91

Enable self-hosted runners

Enable self-hosted runners #91

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
checks: write
pull-requests: write
jobs:
checkstyle:
runs-on: [self-hosted]
container: ['fedora:39']

Check failure on line 17 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 17, Col: 16): A sequence was not expected .github/workflows/ci.yaml (Line: 32, Col: 16): A sequence was not expected
steps:
- name: Install clang-format
run: |
sudo dnf install -y \
cmake \
clang-tools-extra
- name: Check out repository code
uses: actions/checkout@v3
- name: Configure build
run: cmake -B $GITHUB_WORKSPACE/build -S $GITHUB_WORKSPACE
- name: Run checkstyle
run: make -C $GITHUB_WORKSPACE checkstyle
documentation:
runs-on: [self-hosted]
container: ['fedora:39']
steps:
- name: Install packages
run: |
sudo dnf install -y \
cmake \
libcmocka-devel \
doxygen \
libbpf-devel \
python3-breathe \
python3-furo \
python3-sphinx
- name: Check out repository code
uses: actions/checkout@v3
- name: Configure build
run: cmake -B $GITHUB_WORKSPACE/build -S $GITHUB_WORKSPACE
- name: Run checkstyle
run: make -C $GITHUB_WORKSPACE doc
build:
runs-on: [self-hosted]
strategy:
fail-fast: false
matrix:
buildtype: [ 'debug', 'release' ]
image: [ 'fedora:38', 'ubuntu:23.10' ]
container: ${{ matrix.image }}
steps:
- name: Install packages Fedora
if: matrix.image == 'fedora:38'
run: |
sudo dnf -y install 'dnf-command(copr)'
sudo dnf -y install \
clang-tools-extra \
cmake \
libcmocka-devel \
doxygen \
lcov \
libasan \
libbpf-devel \
libubsan \
python3-breathe \
python3-furo \
python3-sphinx \
pkgconf
- name: Install packages Ubuntu
if: matrix.image == 'ubuntu:23.10'
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install \
clang-format \
clang-tidy \
cmake \
doxygen \
furo \
lcov \
libbpf-dev \
libcmocka-dev \
python3-breathe \
python3-pip \
python3-sphinx \
pkgconf
- name: Check out repository code
uses: actions/checkout@v3
- name: Configure build
run: cmake -B $GITHUB_WORKSPACE/build -S $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }}
- name: Build
run: make -C $GITHUB_WORKSPACE/build
- name: Check style
if: matrix.buildtype == 'release'
run: make -C $GITHUB_WORKSPACE/build checkstyle
- name: Run unit tests
run: make -C $GITHUB_WORKSPACE/build test
- name: Coverage
if: matrix.buildtype == 'Debug' && matrix.image == 'fedora:38'
run: make -C $GITHUB_WORKSPACE/build coverage
- name: Upload coverage report to Codecov
if: matrix.buildtype == 'Debug' && matrix.image == 'fedora:38'
uses: codecov/codecov-action@v3
with:
files: build/doc/lcov.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Generate documentation
if: matrix.buildtype == 'release'
run: make -C $GITHUB_WORKSPACE/build doc