Skip to content

Commit

Permalink
ci: add clang permutation, for 64bit only
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
evelikov authored and gregkh committed Oct 16, 2024
1 parent da218a4 commit d4b78d7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/actions/setup-alpine/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ runs:
apk update
apk add \
build-base \
clang \
eudev-dev \
git \
libusb-dev \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/setup-archlinux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ runs:
pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Su \
clang \
git \
lib32-libusb \
lib32-systemd \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/setup-debian/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ runs:
apt-get update
apt-get install --yes \
build-essential \
clang \
crossbuild-essential-i386 \
gcc \
git \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/setup-fedora/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ runs:
run: |
dnf update -y
dnf install -y \
clang \
gcc \
git \
kernel-devel \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/setup-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ runs:
apt-get update
apt-get install --yes \
build-essential \
clang \
crossbuild-essential-i386 \
gcc \
git \
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d4b78d7

Please sign in to comment.