Merge pull request #3256 from Carbenium/ci-centos

CI: Run on CentOS 7 and 8
This commit is contained in:
Peter Keresztes Schmidt 2021-05-24 09:17:47 +02:00 committed by GitHub
commit 0392828ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 1 deletions

30
.github/workflows/ci-centos-7.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: CI CentOS 7
on:
push:
branches:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
container: centos:7
steps:
- name: Enable RPMFusion and EPEL
run: yum -y install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- name: Install git
run: yum -y install https://repo.ius.io/ius-release-el7.rpm && yum -y install git224
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: yum -y update && yum -y install make cmake3 gcc-c++ mariadb-devel ffmpeg-devel libcurl-devel vlc-devel libvncserver-devel libjpeg-turbo-devel "perl(Date::Manip)" "perl(DBD::mysql)" "perl(ExtUtils::MakeMaker)" "perl(Sys::Mmap)" "perl(Sys::Syslog)" "perl(LWP::UserAgent)" polkit-devel
- name: Prepare
run: mkdir build
- name: Configure
run: cd build && cmake3 --version && cmake3 .. -DBUILD_MAN=0 -DENABLE_WERROR=1
- name: Build
run: cd build && make -j3 | grep --line-buffered -Ev '^(cp lib\/|Installing.+\.pm)' && (exit ${PIPESTATUS[0]})

32
.github/workflows/ci-centos-8.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: CI CentOS 8
on:
push:
branches:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
container: centos:8
steps:
- name: Enable RPMFusion, EPEL and PowerTools
run: yum -y install "dnf-command(config-manager)" https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && yum config-manager --set-enabled powertools
- name: Install git
run: yum -y install git
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: yum -y update && yum -y install make cmake gcc-c++ catch-devel mariadb-devel ffmpeg-devel libcurl-devel vlc-devel libvncserver-devel libjpeg-turbo-devel "perl(Date::Manip)" "perl(DBD::mysql)" "perl(ExtUtils::MakeMaker)" "perl(Sys::Mmap)" "perl(Sys::Syslog)" "perl(LWP::UserAgent)" polkit-devel
- name: Prepare
run: mkdir build
- name: Configure
run: cd build && cmake --version && cmake .. -DBUILD_MAN=0 -DBUILD_TEST_SUITE=1 -DENABLE_WERROR=1
- name: Build
run: cd build && make -j3 | grep --line-buffered -Ev '^(cp lib\/|Installing.+\.pm)' && (exit ${PIPESTATUS[0]})
- name: Run test
run: cd build/tests && ./tests "~[notCI]"

View File

@ -6,6 +6,7 @@ target_compile_options(zm-warning-interface
-Wformat-security
-Wno-cast-function-type
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11>:-Wno-clobbered>
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,5.1>:-Wno-missing-field-initializers>
-Wno-unused-parameter
-Woverloaded-virtual
-Wvla)

View File

@ -205,6 +205,7 @@ bool ZM::SockAddrUnix::resolve(const char *path, const char *proto) {
memset(&mAddrUn, 0, sizeof(mAddrUn));
strncpy(mAddrUn.sun_path, path, sizeof(mAddrUn.sun_path));
mAddrUn.sun_path[sizeof(mAddrUn.sun_path) - 1] = '\0';
mAddrUn.sun_family = AF_UNIX;
return true;

View File

@ -80,8 +80,11 @@ TEST_CASE("FontVariant: GetCodepoint") {
std::vector<uint64> bitmap(FontVariant::kMaxNumCodePoints * height);
// fill bitmap for each codepoint alternating with 1 and std::numeric_limits<uint64>::max()
// TODO: restore capture initializer when C++14 is supported
int32 n = 0;
bool zero = true;
std::generate(bitmap.begin(), bitmap.end(),
[n = 0, zero = true]() mutable {
[n, zero]() mutable {
if (n == height) {
zero = !zero;
n = 0;