Add GitHub action for Fedora 35 and CMake

Signed-off-by: Christian Blichmann <cblichmann@google.com>
This commit is contained in:
Christian Blichmann 2022-01-04 14:07:37 +01:00
parent e5a810eef4
commit 7c02a04471
No known key found for this signature in database
GPG Key ID: A59C788ECA4FA381
2 changed files with 49 additions and 1 deletions

48
.github/workflows/fedora-cmake.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: CMake Fedora
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- container: fedora:35
compiler: gcc # GCC 11
ignore-errors: false
# TODO(cblichmann): Add clang-13 build to matrix (currently fails)
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.ignore-errors }}
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v2
- name: Install build tools
run: |
dnf update -y
dnf install -y git make automake patch glibc-static libstdc++-static \
cmake ninja-build python3 python3-pip clang-devel libcap-devel
- name: Install/configure Clang compiler toolchain
if: matrix.compiler == 'clang'
run: |
echo "CXX=clang++" >> $GITHUB_ENV
echo "CC=clang" >> $GITHUB_ENV
- name: Create Build Environment
run: |
pip3 install absl-py clang
cmake -E make_directory $GITHUB_WORKSPACE/build
- name: Configure CMake
run: cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
run: cmake --build $GITHUB_WORKSPACE --config $BUILD_TYPE

View File

@ -1,4 +1,4 @@
name: CMake
name: CMake Ubuntu
on: [push, pull_request]