Skip to content

Commit

Permalink
ci: add alpine tests
Browse files Browse the repository at this point in the history
I plan to package CDBA in alpine, as it uses musl libc it is a lot
easier for things to break there. Add alpine latest edge and stable
build tests to catch these.

Signed-off-by: Caleb Connolly <[email protected]>
  • Loading branch information
calebccff committed Oct 28, 2023
1 parent 6f5b203 commit 57d45d9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
family: [x86-64]
compiler: [gcc, clang]
container:
- alpine:edge
- alpine:latest
- archlinux:latest
- debian:testing
- debian:stable
Expand Down Expand Up @@ -207,7 +209,7 @@ jobs:
if: ${{ matrix.variant == 'i386' }}
run: |
mkdir build
CFLAGS="-m32" LDFLAGS="-m32" meson setup -Dwerror=true . build
CFLAGS="-m32" LDFLAGS="-m32" meson setup --werror . build
- name: Meson init with cross compile
if: ${{ matrix.variant == 'cross-compile' }}
Expand All @@ -227,13 +229,13 @@ jobs:
echo "pkg_config_libdir = '${PKG_CONFIG_PATH}'" >> cross.txt
cat cross.txt
mkdir build
meson setup -Dwerror=true --cross-file cross.txt . build
meson setup --werror --cross-file cross.txt . build
- name: Meson init
if: ${{ matrix.variant == '' }}
run: |
mkdir build
meson setup -Dwerror=true . build
meson setup --errorlogs --werror . build
- name: Compile
run: ninja -C build
Expand Down
29 changes: 29 additions & 0 deletions ci/alpine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2021 Canonical Ltd.
# Copyright (c) 2023 Linaro Ltd
# Author: Krzysztof Kozlowski <[email protected]>
# <[email protected]>
#

set -ex

PKGS_CC="gcc"
case $CC in
clang*)
PKGS_CC="clang"
;;
esac

apk add \
linux-headers \
libftdi1-dev \
yaml-dev \
eudev-dev \
meson \
musl-dev \
libc-dev \
$PKGS_CC

echo "Install finished: $0"

0 comments on commit 57d45d9

Please sign in to comment.