compile all implementations and add them to final image
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7e10b82beb
commit
4fcd1be67c
16
Dockerfile
16
Dockerfile
|
@ -9,16 +9,18 @@ RUN apk add --no-cache \
|
||||||
|
|
||||||
RUN git clone --depth=1 https://github.com/cathugger/mkp224o \
|
RUN git clone --depth=1 https://github.com/cathugger/mkp224o \
|
||||||
&& cd mkp224o \
|
&& cd mkp224o \
|
||||||
&& ./autogen.sh \
|
&& sed -i 's/^\(CFLAGS= .*\)$/\1 -static/' Makefile.in \
|
||||||
&& ./configure --enable-donna-sse2 \
|
&& ./autogen.sh
|
||||||
&& sed -i 's/^\(CFLAGS= .*\)$/\1 -static/' Makefile \
|
|
||||||
&& make -j 4 \
|
COPY matrix-build.sh .
|
||||||
&& strip mkp224o
|
|
||||||
|
RUN cd mkp224o \
|
||||||
|
&& /matrix-build.sh
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
RUN apk add --no-cache tini
|
RUN apk add --no-cache tini
|
||||||
|
|
||||||
COPY --from=builder /mkp224o/mkp224o .
|
COPY --from=builder /usr/local/bin /usr/local/bin
|
||||||
|
|
||||||
ENTRYPOINT ["tini", "--", "/mkp224o"]
|
ENTRYPOINT ["tini", "--", "/usr/local/bin/mkp224o-amd64-51-30k"]
|
||||||
|
|
12
matrix-build.sh
Executable file
12
matrix-build.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
for implementation in ref10 amd64-51-30k amd64-64-24k donna donna-sse2; do
|
||||||
|
./configure \
|
||||||
|
--enable-${implementation} \
|
||||||
|
--enable-binsearch=yes
|
||||||
|
make -j 4
|
||||||
|
strip mkp224o
|
||||||
|
mv mkp224o /usr/local/bin/mkp224o-${implementation}
|
||||||
|
make clean
|
||||||
|
done
|
Reference in a new issue