Add Rocky Linux GitHub action #21
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: Ubuntu | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- reopened | |
permissions: | |
contents: read | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
TZ: Europe/Oslo | |
jobs: | |
ubuntu: | |
strategy: | |
matrix: | |
release: ["16.04", "18.04", "20.04", "22.04"] | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:${{ matrix.release }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y --no-install-recommends clang build-essential \ | |
cmake libyaml-dev libcmocka-dev | |
- name: Run CMake (GCC) | |
run: | | |
mkdir build-gcc && cd build-gcc | |
CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug -DSCONF_BUILD_EXAMPLES=on \ | |
-DSCONF_ENABLE_TESTS=on -Werror=dev .. | |
- name: Run CMake (Clang) | |
run: | | |
mkdir build-clang && cd build-clang | |
CC=clang cmake -DCMAKE_BUILD_TYPE=Debug -DSCONF_BUILD_EXAMPLES=on \ | |
-DSCONF_ENABLE_TESTS=on -Werror=dev .. | |
- name: Build code (GCC) | |
run: cmake --build build-gcc | |
- name: Build code (clang) | |
run: cmake --build build-clang | |
- name: Run tests (GCC) | |
run: cmake --build build-gcc --target test | |
- name: Run tests (clang) | |
run: cmake --build build-clang --target test |