Skip to content

Commit

Permalink
GHA: also build on Alpine to test LibreSSL which is used on OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Jan 3, 2024
1 parent 1b3be52 commit 77046cd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/alpine-bash.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM alpine:3
RUN ["apk", "--no-cache", "add", "bash"]
8 changes: 7 additions & 1 deletion .github/workflows/linux.bash
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash
set -exo pipefail

export PATH="/usr/lib/ccache:/usr/lib64/ccache:/opt/rh/devtoolset-11/root/usr/bin:$PATH"
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/lib64/ccache:/opt/rh/devtoolset-11/root/usr/bin:$PATH"
export CCACHE_DIR=/icinga2/ccache
export CTEST_OUTPUT_ON_FAILURE=1
CMAKE_OPTS=''

case "$DISTRO" in
alpine:*)
apk add bison {boost,libressl}-dev ccache cmake flex g++ ninja-build tzdata
ln -vs /usr/lib/ninja-build/bin/ninja /usr/local/bin/ninja
CMAKE_OPTS="-DUSE_SYSTEMD=OFF $(echo -DICINGA2_WITH_{MYSQL,PGSQL,COMPAT,LIVESTATUS,PERFDATA,ICINGADB}=OFF)"
;;

amazonlinux:2)
amazon-linux-extras install -y epel
yum install -y bison ccache cmake3 gcc-c++ flex ninja-build \
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
max-parallel: 2
matrix:
distro:
- alpine:bash # LibreSSL, used on OpenBSD
- amazonlinux:2
- amazonlinux:2023
- centos:7 # and RHEL 7
Expand Down Expand Up @@ -51,7 +52,13 @@ jobs:
path: ccache
key: ccache/${{ matrix.distro }}

- name: Build
- name: Build Docker image
if: "matrix.distro == 'alpine:bash'"
run: >-
docker build --file .github/workflows/alpine-bash.Dockerfile
--tag alpine:bash `mktemp -d`
- name: Build Icinga
run: >-
docker run --rm -v "$(pwd):/icinga2" -e DISTRO=${{ matrix.distro }}
${{ matrix.distro }} /icinga2/.github/workflows/linux.bash

0 comments on commit 77046cd

Please sign in to comment.