From a38ecf6380f7430f2ec45c02473f9108265185ae Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Fri, 25 Nov 2022 16:33:09 +0100 Subject: [PATCH] Add Alpine Linux test images Signed-off-by: Thomas Lauf --- .github/workflows/tests.yaml | 6 ++++++ docker-compose.yml | 16 ++++++++++++++++ test/docker/alpine-edge | 33 +++++++++++++++++++++++++++++++++ test/docker/alpine-latest | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 test/docker/alpine-edge create mode 100644 test/docker/alpine-latest diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8ca6fb20..9257680c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,6 +6,12 @@ jobs: fail-fast: false matrix: include: + - name: "Alpine Edge" + runner: ubuntu-latest + container: alpine-edge + - name: "Alpine Latest" + runner: ubuntu-latest + container: alpine-latest - name: "Archlinux Base" runner: ubuntu-latest container: archlinux diff --git a/docker-compose.yml b/docker-compose.yml index 046e1e8b..fb4afcbf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,21 @@ version: '3' services: + test-alpine-edge: + build: + context: . + dockerfile: test/docker/alpine-edge + network_mode: "host" + security_opt: + - label=type:container_runtime_t + tty: true + test-alpine-latest: + build: + context: . + dockerfile: test/docker/alpine-latest + network_mode: "host" + security_opt: + - label=type:container_runtime_t + tty: true test-fedora31: build: context: . diff --git a/test/docker/alpine-edge b/test/docker/alpine-edge new file mode 100644 index 00000000..70bfc1cb --- /dev/null +++ b/test/docker/alpine-edge @@ -0,0 +1,33 @@ +FROM alpine:edge + +RUN apk add --no-cache \ + asciidoctor \ + bash \ + cmake \ + g++ \ + git \ + make \ + mandoc \ + musl-dev \ + python3 \ + py3-dateutil + +# Setup environment +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 +ENV MAN_DISABLE_SECCOMP 1 + +# Setup timewarrior +ADD . /root/code/ +WORKDIR /root/code/ +RUN git clean -dfx +RUN git submodule init +RUN git submodule update +RUN cmake -DCMAKE_BUILD_TYPE=debug . +RUN make -j2 +RUN make install + +# Setup tests +RUN make -j2 test || true +WORKDIR /root/code/test/ +CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"] diff --git a/test/docker/alpine-latest b/test/docker/alpine-latest new file mode 100644 index 00000000..cb071cfe --- /dev/null +++ b/test/docker/alpine-latest @@ -0,0 +1,33 @@ +FROM alpine:latest + +RUN apk add --no-cache \ + asciidoctor \ + bash \ + cmake \ + g++ \ + git \ + make \ + man-db \ + musl-dev \ + python3 \ + py3-dateutil + +# Setup environment +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 +ENV MAN_DISABLE_SECCOMP 1 + +# Setup timewarrior +ADD . /root/code/ +WORKDIR /root/code/ +RUN git clean -dfx +RUN git submodule init +RUN git submodule update +RUN cmake -DCMAKE_BUILD_TYPE=debug . +RUN make -j2 +RUN make install + +# Setup tests +RUN make -j2 test || true +WORKDIR /root/code/test/ +CMD ["bash", "-c", "./problems --summary ; cat all.log | grep 'not ok' ; ./problems ; FAILED=$? ; echo timew $( timew --version ) ; python --version ; cmake --version ; gcc --version; exit $FAILED"]