Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Alpine 3.20 #441

Merged
merged 7 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ jobs:
# All (build on the base image):
# - linux/386
# - linux/amd64
# - linux/arm/v5
# - linux/arm/v6
# - linux/arm/v7
# - linux/arm64/v8
# - linux/ppc64le
# - linux/riscv64
# - linux/s390x
# Does not build:
# - linux/s390x
# - linux/mips64le
# No users on this platform:
# - linux/ppc64le
PLATFORM: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8
PLATFORM: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/riscv64
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ jobs:
# All (build on the base image):
# - linux/386
# - linux/amd64
# - linux/arm/v5
# - linux/arm/v6
# - linux/arm/v7
# - linux/arm64/v8
# - linux/ppc64le
# - linux/riscv64
# - linux/s390x
# Does not build:
# - linux/s390x
# - linux/mips64le
# No users on this platform:
# - linux/ppc64le
PLATFORM: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le
PLATFORM: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64

create_release:
name: Create release
Expand Down
49 changes: 30 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
FROM debian:bookworm-slim AS builder
FROM alpine:3.20 AS builder

RUN apt-get update && \
apt-get install -y \
RUN apk add --update --no-cache \
binutils-dev \
build-essential \
# Debian: build-essential
build-base \
cmake \
git \
libcurl4-openssl-dev \
libdw-dev \
libiberty-dev \
libssl-dev \
# Debian: libcurl4-openssl-dev
curl-dev \
curl-static \
# Debian: libdw-dev
libdw \
# Debian, alpine bundled in binutils-dev
# libiberty-dev \
# Debian: libssl-dev
openssl-dev \
ninja-build \
python3 \
zlib1g-dev \
;
# Debian: zlib1g-dev
zlib-dev \
# Debian: libelf-dev
elfutils-dev \
# Debian: libstdc++-12-dev
libstdc++-dev \
;

ADD . /src/

RUN mkdir /src/build && \
cd /src/build && \
export PATH="$PATH:/usr/lib/ninja-build/bin/" && \
cmake -G 'Ninja' .. && \
cmake --build . && \
cmake --build . --target install

FROM debian:bookworm-slim
FROM alpine:3.20

COPY --from=builder /usr/local/bin/kcov* /usr/local/bin/
COPY --from=builder /usr/local/share/doc/kcov /usr/local/share/doc/kcov

RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends --no-install-suggests \
libcurl4 \
libdw1 \
zlib1g \
apk add --update --no-cache \
bash \
libcurl \
libdw \
zlib \
libgcc \
libstdc++ \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
# Write a test script
echo '#!/usr/bin/env bash\nif [[ true ]]; then\necho "Hello, kcov!"\nfi' > /tmp/test-executable.sh; \
echo -e '#!/usr/bin/env bash\nif [[ true ]]; then\necho "Hello, kcov!"\nfi' > /tmp/test-executable.sh; \
# Test kcov
kcov --include-pattern=/tmp/test-executable.sh /tmp/coverage /tmp/test-executable.sh; \
williamdes marked this conversation as resolved.
Show resolved Hide resolved
# Display
Expand Down
Loading