diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3feb3e2c..c730beba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ variables: builder ubuntu base: <<: *docker_base_builder variables: - DOCKER_BASE_IMAGE: ubuntu:bionic + DOCKER_BASE_IMAGE: ubuntu:focal builder fedora-31 base: <<: *docker_base_builder @@ -60,6 +60,16 @@ builder fedora-33 base: variables: DOCKER_BASE_IMAGE: fedora:33 +builder archlinux base: + <<: *docker_base_builder + variables: + DOCKER_BASE_IMAGE: archlinux:base + +builder alpine base: + <<: *docker_base_builder + variables: + DOCKER_BASE_IMAGE: alpine:latest + .docker_builder: &docker_builder <<: *docker_base_builder stage: dependencies @@ -87,6 +97,10 @@ builder ubuntu gcc-10: *docker_builder builder fedora-31 clang-8: *docker_builder builder fedora-32 clang-10: *docker_builder builder fedora-33 clang-11: *docker_builder +builder archlinux clang: *docker_builder +builder archlinux gcc: *docker_builder +builder alpine gcc: *docker_builder +# builder alpine clang: *docker_builder .build_stages: &build_stages retry: @@ -104,34 +118,38 @@ builder fedora-33 clang-11: *docker_builder - cd build - > cmake - -DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS - -DMAINTAINER_MODE=ON -DBUILD_AUDACIOUS=$BUILD_AUDACIOUS - -DBUILD_MYSQL=ON + -DBUILD_HTTP=ON + -DBUILD_ICAL=$BUILD_ICAL + -DBUILD_ICONV=ON + -DBUILD_IRC=$BUILD_IRC + -DBUILD_JOURNAL=$BUILD_JOURNAL + -DBUILD_LUA_CAIRO=$BUILD_LUA_CAIRO -DBUILD_LUA_IMLIB2=ON -DBUILD_LUA_RSVG=$BUILD_LUA_RSVG - -DBUILD_LUA_CAIRO=$BUILD_LUA_CAIRO - -DBUILD_XMMS2=$BUILD_XMMS2 - -DBUILD_ICAL=ON - -DBUILD_IRC=ON - -DBUILD_HTTP=ON - -DBUILD_ICONV=ON - -DBUILD_PULSEAUDIO=ON - -DBUILD_JOURNAL=$BUILD_JOURNAL - -DBUILD_RSS=ON - -DBUILD_IRC=ON + -DBUILD_MYSQL=$BUILD_MYSQL -DBUILD_NVIDIA=$BUILD_NVIDIA + -DBUILD_PULSEAUDIO=$BUILD_PULSEAUDIO + -DBUILD_RSS=$BUILD_RSS + -DBUILD_XMMS2=$BUILD_XMMS2 + -DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS + -DMAINTAINER_MODE=ON .. - make -j4 .build_variables: &build_variables - LINKER_FLAGS: "" BUILD_AUDACIOUS: "ON" - BUILD_XMMS2: "ON" - BUILD_NVIDIA: "ON" + BUILD_ICAL: "ON" + BUILD_IRC: "ON" BUILD_JOURNAL: "ON" BUILD_LUA_CAIRO: "ON" BUILD_LUA_RSVG: "ON" + BUILD_MYSQL: "ON" + BUILD_NVIDIA: "ON" + BUILD_PULSEAUDIO: "ON" + BUILD_RSS: "ON" + BUILD_XMMS2: "ON" + LINKER_FLAGS: "" ubuntu clang-9: <<: *build_stages @@ -226,6 +244,68 @@ fedora-33 clang-11: CXX: clang++ BUILD_AUDACIOUS: "OFF" +archlinux clang: + <<: *build_stages + variables: + <<: *build_variables + DISTRO: archlinux + COMPILER: clang + CC: clang + CXX: clang++ + BUILD_AUDACIOUS: "OFF" + BUILD_XMMS2: "OFF" + +archlinux gcc: + <<: *build_stages + variables: + <<: *build_variables + DISTRO: archlinux + COMPILER: gcc + CC: gcc + CXX: g++ + BUILD_AUDACIOUS: "OFF" + BUILD_XMMS2: "OFF" + +alpine gcc: + <<: *build_stages + variables: + <<: *build_variables + DISTRO: alpine + COMPILER: gcc + CC: gcc + CXX: g++ + BUILD_AUDACIOUS: "OFF" + BUILD_ICAL: "OFF" + BUILD_IRC: "OFF" + BUILD_JOURNAL: "OFF" + BUILD_LUA_CAIRO: "OFF" + BUILD_LUA_RSVG: "OFF" + BUILD_MYSQL: "OFF" + BUILD_NVIDIA: "OFF" + BUILD_PULSEAUDIO: "OFF" + BUILD_RSS: "OFF" + BUILD_XMMS2: "OFF" + +# alpine clang: +# <<: *build_stages +# variables: +# <<: *build_variables +# DISTRO: alpine +# COMPILER: clang +# CC: clang +# CXX: clang++ +# BUILD_AUDACIOUS: "OFF" +# BUILD_ICAL: "OFF" +# BUILD_IRC: "OFF" +# BUILD_JOURNAL: "OFF" +# BUILD_LUA_CAIRO: "OFF" +# BUILD_LUA_RSVG: "OFF" +# BUILD_MYSQL: "OFF" +# BUILD_NVIDIA: "OFF" +# BUILD_PULSEAUDIO: "OFF" +# BUILD_RSS: "OFF" +# BUILD_XMMS2: "OFF" + .test_stages: &test_stages retry: max: 2 @@ -360,6 +440,42 @@ test fedora-33 clang-11: CC: clang CXX: clang++ +test archlinux clang: + <<: *test_stages + <<: *test_run + variables: + DISTRO: archlinux + COMPILER: clang + CC: clang + CXX: clang++ + +test archlinux gcc: + <<: *test_stages + <<: *test_run + variables: + DISTRO: archlinux + COMPILER: gcc + CC: gcc + CXX: g++ + +test alpine gcc: + <<: *test_stages + <<: *test_run + variables: + DISTRO: alpine + COMPILER: gcc + CC: gcc + CXX: g++ + +# test alpine clang: +# <<: *test_stages +# <<: *test_run +# variables: +# DISTRO: alpine +# COMPILER: clang +# CC: clang +# CXX: clang++ + .check_stages: &check_stages retry: max: 2 diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index abc7ece1..3e6d6a6b 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -130,6 +130,7 @@ endif(NOT if(OS_LINUX) check_include_files("linux/soundcard.h" HAVE_SOME_SOUNDCARD_H) check_include_files("linux/soundcard.h" HAVE_LINUX_SOUNDCARD_H) + check_include_files("linux/sockios.h" HAVE_LINUX_SOCKIOS_H) elseif(OS_OPENBSD) check_include_files("soundcard.h" HAVE_SOME_SOUNDCARD_H) else(OS_LINUX) diff --git a/tests/dockerfiles/Dockerfile.alpine-base b/tests/dockerfiles/Dockerfile.alpine-base new file mode 100644 index 00000000..2d0e9b7d --- /dev/null +++ b/tests/dockerfiles/Dockerfile.alpine-base @@ -0,0 +1,24 @@ +FROM alpine:latest + +RUN apk add --no-cache \ + binutils \ + cmake \ + curl-dev \ + docbook2x \ + gettext-tiny-dev \ + git \ + icu-dev \ + imlib2-dev \ + iw \ + libmicrohttpd-dev \ + libpulse \ + libxdamage-dev \ + libxext-dev \ + libxft-dev \ + libxinerama-dev \ + linux-headers \ + lua5.3-dev \ + make \ + musl-dev \ + ncurses-dev \ + patch diff --git a/tests/dockerfiles/Dockerfile.alpine-clang b/tests/dockerfiles/Dockerfile.alpine-clang new file mode 100644 index 00000000..0c56e780 --- /dev/null +++ b/tests/dockerfiles/Dockerfile.alpine-clang @@ -0,0 +1,5 @@ +ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky +FROM ${IMAGE}/builder/arch-base:latest + +RUN apk add --no-cache \ + clang diff --git a/tests/dockerfiles/Dockerfile.alpine-gcc b/tests/dockerfiles/Dockerfile.alpine-gcc new file mode 100644 index 00000000..1463b84c --- /dev/null +++ b/tests/dockerfiles/Dockerfile.alpine-gcc @@ -0,0 +1,6 @@ +ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky +FROM ${IMAGE}/builder/alpine-base:latest + +RUN apk add --no-cache \ + g++ \ + gcc diff --git a/tests/dockerfiles/Dockerfile.archlinux-base b/tests/dockerfiles/Dockerfile.archlinux-base new file mode 100644 index 00000000..48616aee --- /dev/null +++ b/tests/dockerfiles/Dockerfile.archlinux-base @@ -0,0 +1,37 @@ +FROM archlinux:base + +# Fix from https://www.reddit.com/r/archlinux/comments/lek2ba/arch_linux_on_docker_ci_could_not_find_or_read/ +RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && \ + curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && \ + bsdtar -C / -xvf "$patched_glibc" + +RUN pacman -Syu --noconfirm --needed \ + cairo \ + cmake \ + docbook2x \ + git \ + glib2 \ + imlib2 \ + iw \ + libical \ + libircclient \ + libmicrohttpd \ + libpulse \ + librsvg \ + libxdamage \ + libxext \ + libxft \ + libxinerama \ + libxnvctrl \ + lua \ + make \ + man-db \ + mariadb-libs \ + patch \ + pkg-config \ + wireless_tools \ + && git clone https://github.com/linux-test-project/lcov.git \ + && cd lcov \ + && make install \ + && cd .. \ + && rm -rf lcov diff --git a/tests/dockerfiles/Dockerfile.archlinux-clang b/tests/dockerfiles/Dockerfile.archlinux-clang new file mode 100644 index 00000000..dba4d09c --- /dev/null +++ b/tests/dockerfiles/Dockerfile.archlinux-clang @@ -0,0 +1,6 @@ +ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky +FROM ${IMAGE}/builder/archlinux-base:latest + +RUN pacman -Syu --noconfirm --needed \ + clang \ + libc++ diff --git a/tests/dockerfiles/Dockerfile.archlinux-gcc b/tests/dockerfiles/Dockerfile.archlinux-gcc new file mode 100644 index 00000000..5fd22409 --- /dev/null +++ b/tests/dockerfiles/Dockerfile.archlinux-gcc @@ -0,0 +1,5 @@ +ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky +FROM ${IMAGE}/builder/archlinux-base:latest + +RUN pacman -Syu --noconfirm --needed \ + gcc