mirror of
https://github.com/sddm/sddm.git
synced 2024-11-27 03:54:04 +08:00
4ec29a8bba
Clazy is reproducibly broken, it crashes immediately.
101 lines
3.3 KiB
YAML
101 lines
3.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
env:
|
|
CLAZY_CHECKS: "level1"
|
|
|
|
jobs:
|
|
build:
|
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
container-image:
|
|
- "quay.io/fedora/fedora:rawhide"
|
|
- "registry.opensuse.org/opensuse/tumbleweed-dnf"
|
|
- "docker.io/library/ubuntu:22.04"
|
|
- "docker.io/library/ubuntu:23.04"
|
|
compiler:
|
|
- gcc
|
|
- clang
|
|
qt:
|
|
- "qt5"
|
|
include:
|
|
- container-image: "quay.io/centos/centos:stream9"
|
|
compiler: gcc
|
|
qt: "qt5"
|
|
- container-image: "docker.io/library/ubuntu:23.04"
|
|
compiler: clang
|
|
qt: "qt6"
|
|
- container-image: "docker.io/library/ubuntu:23.04"
|
|
compiler: gcc
|
|
qt: "qt6"
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: ${{ matrix.container-image }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Dependencies (rpm-type)
|
|
if: ${{ contains(matrix.container-image, 'fedora') || contains(matrix.container-image, 'centos') || contains(matrix.container-image, 'opensuse') }}
|
|
run: |
|
|
set -x
|
|
dnf --assumeyes install dnf-plugins-core
|
|
if [[ "${{ matrix.container-image }}" =~ "centos" ]]; then dnf --assumeyes config-manager --set-enabled crb && dnf --assumeyes install epel-release; fi
|
|
dnf --assumeyes builddep sddm
|
|
if [ "${{ matrix.qt }}" = "qt5" ] && [[ "${{ matrix.container-image }}" =~ "fedora" ]]; then dnf --assumeyes install qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qttools-devel; fi
|
|
dnf --assumeyes install --allowerasing --nobest clang clazy
|
|
- name: Dependencies (deb-type)
|
|
if: ${{ contains(matrix.container-image, 'ubuntu') }}
|
|
run: |
|
|
set -x
|
|
sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list"
|
|
apt-get update -y
|
|
DEBIAN_FRONTEND=noninteractive apt-get build-dep sddm -y
|
|
if [ "${{ matrix.qt }}" = "qt6" ]; then
|
|
DEBIAN_FRONTEND=noninteractive apt-get install clang clazy qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-declarative-dev qml6-module-qtqml-workerscript qml6-module-qtquick-window -y
|
|
else
|
|
DEBIAN_FRONTEND=noninteractive apt-get install clang clazy qml-module-qttest -y
|
|
fi
|
|
- name: Build
|
|
run: |
|
|
set -x
|
|
mkdir -p build
|
|
cd build
|
|
if [ "${{ matrix.qt }}" = "qt6" ]; then
|
|
BUILD_WITH_QT6=ON
|
|
else
|
|
BUILD_WITH_QT6=OFF
|
|
fi
|
|
if [ "${{ matrix.compiler }}" = "clang" ]; then
|
|
export CC=clang
|
|
#export CXX=clang++
|
|
export CXX=clazy
|
|
fi
|
|
if [ -f "/usr/etc/login.defs" ]; then
|
|
export LOGIN_DEFS_PATH="/usr/etc/login.defs"
|
|
else
|
|
export LOGIN_DEFS_PATH="/etc/login.defs"
|
|
fi
|
|
cmake .. \
|
|
-DBUILD_MAN_PAGES:BOOL=ON \
|
|
-DBUILD_WITH_QT6:BOOL=${BUILD_WITH_QT6} \
|
|
-DLOGIN_DEFS_PATH:PATH="${LOGIN_DEFS_PATH}"
|
|
make -j $(getconf _NPROCESSORS_ONLN)
|
|
make install
|
|
- name: Test
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: "1"
|
|
working-directory: build
|
|
run: make test
|