ci: add clang permutation, for 64bit only

Throw clang into the matrix, so we get a bit of extra coverage. As
evidenced by the disabled warning - it does catch extra issues.

Currently enabled only for 64bit builds, since fiddling with environment
variables and cross-files is more tricky than I can be asked atm x-D

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov 2024-10-16 15:32:56 +01:00 committed by Greg Kroah-Hartman
parent da218a4b4e
commit d4b78d735f
7 changed files with 20 additions and 6 deletions

View File

@ -14,6 +14,7 @@ runs:
apk update
apk add \
build-base \
clang \
eudev-dev \
git \
libusb-dev \

View File

@ -16,6 +16,7 @@ runs:
pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Su \
clang \
git \
lib32-libusb \
lib32-systemd \

View File

@ -15,6 +15,7 @@ runs:
apt-get update
apt-get install --yes \
build-essential \
clang \
crossbuild-essential-i386 \
gcc \
git \

View File

@ -13,6 +13,7 @@ runs:
run: |
dnf update -y
dnf install -y \
clang \
gcc \
git \
kernel-devel \

View File

@ -15,6 +15,7 @@ runs:
apt-get update
apt-get install --yes \
build-essential \
clang \
crossbuild-essential-i386 \
gcc \
git \

View File

@ -18,17 +18,24 @@ permissions:
jobs:
build:
env:
CC: ${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: ['clang', 'gcc']
container:
- 'alpine:latest'
- 'archlinux:multilib-devel'
- 'debian:unstable'
- 'fedora:latest'
- 'ubuntu:24.04'
include:
- container: 'alpine:latest'
- container: 'archlinux:multilib-devel'
crossfile: 'arch-cross.ini'
- container: 'debian:unstable'
crossfile: 'debian-cross.ini'
- container: 'fedora:latest'
- container: 'ubuntu:24.04'
crossfile: 'ubuntu-cross.ini'
@ -75,11 +82,12 @@ jobs:
run: meson dist -C build
- name: configure (32bit)
if: ${{ matrix.crossfile != '' }}
if: ${{ matrix.crossfile != '' && matrix.compiler != 'clang' }}
run: |
cp .github/cross-files/${{ matrix.crossfile }} cross.ini
unset CC
meson setup --native-file build-dev.ini --cross-file cross.ini build32
- name: build (32bit)
if: ${{ matrix.crossfile != '' }}
run: meson compile -C build32
if: ${{ matrix.crossfile != '' && matrix.compiler != 'clang' }}
run: unset CC && meson compile -C build32

View File

@ -18,7 +18,8 @@ cc = meson.get_compiler('c')
add_project_arguments(
cc.get_supported_arguments([
'-Wbad-function-cast',
'-Wcast-align',
# should be removed and the code fixed
'-Wno-cast-align',
'-Wchar-subscripts',
'-Wempty-body',
'-Wformat',