Enable self-hosted runners #111
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
checks: write | |
pull-requests: write | |
jobs: | |
checkstyle: | |
container: "fedora:38" | |
runs-on: [self-hosted, ARM64] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
sudo dnf --disablerepo=* --enablerepo=fedora,updates --setopt=install_weak_deps=False -y install \ | |
clang-tools-extra | |
- name: Run checkstyle | |
run: ${GITHUB_WORKSPACE}/resources/checkstyle --sources ${GITHUB_WORKSPACE} | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: ["fedora:38", "ubuntu:23.10"] | |
arch: ["X64", "ARM64"] | |
container: ${{ matrix.image }} | |
needs: [checkstyle] | |
runs-on: [self-hosted, "${{ matrix.arch }}"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install dnf5 | |
if: matrix.image == 'fedora:38' | |
run: | | |
sudo dnf --disablerepo=* --enablerepo=fedora,updates --setopt=install_weak_deps=False -y install dnf5 | |
- name: Install packages Fedora | |
if: matrix.image == 'fedora:38' | |
run: | | |
sudo dnf5 --disablerepo=* --enablerepo=fedora,updates --setopt=install_weak_deps=False -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: Configure build | |
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build | |
- name: Build | |
run: make -C $GITHUB_WORKSPACE/build | |
- name: Check style | |
if: matrix.image == 'fedora:38' && matrix.arch == 'ARM64' | |
run: make -C $GITHUB_WORKSPACE/build checkstyle | |
- name: Run unit tests | |
if: matrix.image == 'fedora:38' && matrix.arch == 'ARM64' | |
run: make -C $GITHUB_WORKSPACE/build test | |
- name: Coverage | |
if: matrix.image == 'fedora:38' && matrix.arch == 'ARM64' | |
run: make -C $GITHUB_WORKSPACE/build coverage | |
- name: Upload coverage report to Codecov | |
if: matrix.image == 'fedora:38' && matrix.arch == 'ARM64' | |
uses: codecov/codecov-action@v3 | |
with: | |
files: build/doc/lcov.out | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Generate documentation | |
if: matrix.image == 'fedora:38' && matrix.arch == 'ARM64' | |
run: make -C $GITHUB_WORKSPACE/build doc |