Split shared and static build container
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Armin Friedl 2021-02-24 21:36:27 +01:00
parent 52ad54b6ea
commit a80be616f6
Signed by: armin
GPG key ID: 48C726EEE7FBCBC8
6 changed files with 68 additions and 25 deletions

View file

@ -2,12 +2,26 @@ kind: pipeline
name: default name: default
steps: steps:
- name: docker - name: glibc-shared
image: plugins/docker image: plugins/docker
settings: settings:
dockerfile: glibc-shared/Dockerfile
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
repo: arminfriedl/xwim-build repo: arminfriedl/xwim-build
tags: latest tags:
- shared
- name: musl-static
image: plugins/docker
settings:
dockerfile: musl-static/Dockerfile
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: arminfriedl/xwim-build
tags:
- static

View file

@ -1,23 +0,0 @@
FROM ubuntu:rolling
# Needed to prevent ubuntu from showing interactive
# dialog when e.g. installing tzdata
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y\
# Base dependencies for: `git push` xwim build
## meson/build essentials
build-essential cmake pkg-config meson ninja-build g++ doxygen git \
## test coverage generator
gcovr \
## xwim dependencies
libspdlog-dev libfmt-dev libarchive-dev libtclap-dev \
# Dependencies for release build/libarchive build
zip \
&& mkdir /build/
COPY ./entrypoint.sh /usr/local/bin
WORKDIR /build/
CMD ["entrypoint.sh"]

23
glibc-shared/Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM ubuntu:rolling
# Needed to prevent ubuntu from showing interactive
# dialog when e.g. installing tzdata
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y\
# Base dependencies for: `git push` xwim build
## meson/build essentials
build-essential cmake pkg-config meson ninja-build g++ doxygen git \
## test coverage generator
gcovr \
## xwim dependencies
libspdlog-dev libfmt-dev libarchive-dev libtclap-dev \
# Dependencies for release build/libarchive build
zip \
&& mkdir /build/
COPY ./entrypoint.sh /usr/local/bin
WORKDIR /build/
CMD ["entrypoint.sh"]

24
musl-static/Dockerfile Normal file
View file

@ -0,0 +1,24 @@
FROM alpine:3.13
ENV LDFLAGS="-static-libgcc -static-libstdc++ -static"
RUN apk add --no-cache \
build-base cmake git meson pkgconf doxygen graphviz \
libarchive-static libarchive-dev \
libressl-dev \
tclap-dev \
bzip2-static acl-static expat-static zstd-static lz4-static zlib-static xz-dev
WORKDIR /build/
RUN git clone --depth 1 --branch 7.1.3 https://github.com/fmtlib/fmt.git \
&& git clone --depth 1 --branch v1.8.2 https://github.com/gabime/spdlog.git
RUN cd fmt && mkdir build && cd build \
&& cmake -DFMT_DOC=FALSE -DFMT_TEST=FALSE -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE --target fmt .. && make -j && make install
RUN cd spdlog && mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. && make -j && make install
COPY ./entrypoint.sh /usr/local/bin
CMD ["entrypoint.sh"]

5
musl-static/entrypoint.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
meson --buildtype release --strip --layout flat --default-library static target
ninja -C target
strip target/meson-out/xwim