Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM busybox:glibc
FROM busybox

MAINTAINER "André Stein <[email protected]>"

Expand Down
10 changes: 10 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:edge

RUN apk add --no-cache g++ binutils-gold clang \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need gold though, LDC doesn't use it (doesn't quite work on Alpine).
See https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/ldc/01-conf.patch

zlib-dev curl-dev curl-static openssl openssl-dev make git \
ldc dub dtools-rdmd

COPY docker.build.sh /docker.build.sh
RUN chmod +x /docker.build.sh

ENTRYPOINT [ "/docker.build.sh" ]
5 changes: 5 additions & 0 deletions ci/docker.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e -u

cd /core/
DFLAGS="-linker=bfd" dub build -c static --compiler=ldc2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bfd is the default, see my above comment.

4 changes: 3 additions & 1 deletion ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ dub --compiler=${DC} -- --sanitycheck

# Compile to static binary with ldc
if [[ "${DC}" == "ldc2" ]]; then
dub build -c static --compiler=${DC}
docker build -t dlangtour_build ./ci/
docker run --rm -v `pwd`:/core/ -ti dlangtour_build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the interactive run ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from the docker run below.


docker build -t dlangtour_test_image ./
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -ti dlangtour_test_image --wait-until-pulled --sanitycheck
fi