Skip to content

Commit 0673dfa

Browse files
authored
Merge pull request #9949 from Icinga/libressl
GHA: also build on Alpine to test LibreSSL which is used on OpenBSD
2 parents 27e1850 + b521a97 commit 0673dfa

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This Dockerfile is used in the linux job for Alpine Linux.
2+
#
3+
# As the linux.bash script is, in fact, a bash script and Alpine does not ship
4+
# a bash by default, the "alpine:bash" container will be built using this
5+
# Dockerfile in the GitHub Action.
6+
7+
FROM alpine:3
8+
RUN ["apk", "--no-cache", "add", "bash"]

.github/workflows/linux.bash

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
#!/bin/bash
22
set -exo pipefail
33

4-
export PATH="/usr/lib/ccache:/usr/lib64/ccache:$PATH"
4+
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/lib64/ccache:$PATH"
55
export CCACHE_DIR=/icinga2/ccache
66
export CTEST_OUTPUT_ON_FAILURE=1
77
CMAKE_OPTS=()
88

99
case "$DISTRO" in
10+
alpine:*)
11+
# Packages inspired by the Alpine package, just
12+
# - LibreSSL instead of OpenSSL 3 and
13+
# - no MariaDB or libpq as they depend on OpenSSL.
14+
# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/icinga2/APKBUILD
15+
apk add bison boost-dev ccache cmake flex g++ libedit-dev libressl-dev ninja-build tzdata
16+
ln -vs /usr/lib/ninja-build/bin/ninja /usr/local/bin/ninja
17+
18+
CMAKE_OPTS="-DUSE_SYSTEMD=OFF -DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF"
19+
20+
# This test fails due to some glibc/musl mismatch regarding timezone PST/PDT.
21+
# - https://www.openwall.com/lists/musl/2024/03/05/2
22+
# - https://gitlab.alpinelinux.org/alpine/aports/-/blob/b3ea02e2251451f9511086e1970f21eb640097f7/community/icinga2/disable-failing-tests.patch
23+
sed -i '/icinga_legacytimeperiod\/dst$/d' /icinga2/test/CMakeLists.txt
24+
;;
25+
1026
amazonlinux:2)
1127
amazon-linux-extras install -y epel
1228
yum install -y bison ccache cmake3 gcc-c++ flex ninja-build system-rpm-config \

.github/workflows/linux.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
max-parallel: 2
2222
matrix:
2323
distro:
24+
# Alpine Linux to build Icinga 2 with LibreSSL, OpenBSD's default.
25+
# The "alpine:bash" image will be built below based on "alpine:3".
26+
- alpine:bash
27+
2428
- amazonlinux:2
2529
- amazonlinux:2023
2630

@@ -68,7 +72,13 @@ jobs:
6872
path: ccache
6973
key: ccache/${{ matrix.distro }}
7074

71-
- name: Build
75+
- name: Build Alpine Docker Image
76+
if: "matrix.distro == 'alpine:bash'"
77+
run: >-
78+
docker build --file .github/workflows/alpine-bash.Dockerfile
79+
--tag alpine:bash `mktemp -d`
80+
81+
- name: Build Icinga
7282
run: >-
7383
docker run --rm -v "$(pwd):/icinga2" -e DISTRO=${{ matrix.distro }}
7484
--platform ${{ matrix.platform }} ${{ matrix.distro }} /icinga2/.github/workflows/linux.bash

0 commit comments

Comments
 (0)