mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add autotools build to localbuild docker images.
This commit is contained in:
parent
8c0fd40356
commit
3851cfb652
6
.hadolint.yaml
Normal file
6
.hadolint.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
ignored:
|
||||||
|
- DL3007
|
||||||
|
- DL3008
|
||||||
|
- DL3013
|
||||||
|
- DL3018
|
23
other/docker/autotools/Dockerfile
Normal file
23
other/docker/autotools/Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
################################################
|
||||||
|
# autotools-linux
|
||||||
|
FROM localbuild/travis:1.0.0
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
libtool \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
USER travis
|
||||||
|
|
||||||
|
# Copy minimal files to run "autotools-linux install", so we can avoid
|
||||||
|
# rebuilding nacl and other things when only source files change.
|
||||||
|
RUN mkdir -p /home/travis/build/c-toxcore /home/travis/cache
|
||||||
|
WORKDIR /home/travis/build/c-toxcore
|
||||||
|
COPY --chown=travis:travis c-toxcore/.travis/ /home/travis/build/c-toxcore/.travis/
|
||||||
|
RUN .travis/autotools-linux install
|
||||||
|
|
||||||
|
# Now copy the rest of the sources and run the build.
|
||||||
|
COPY --chown=travis:travis . /home/travis/build/
|
||||||
|
RUN .travis/autotools-linux script
|
14
other/docker/cmake/Dockerfile
Normal file
14
other/docker/cmake/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
################################################
|
||||||
|
# cmake-linux
|
||||||
|
FROM localbuild/travis:1.0.0
|
||||||
|
|
||||||
|
# Copy minimal files to run "cmake-linux install", so we can avoid rebuilding
|
||||||
|
# astyle and other things when only source files change.
|
||||||
|
RUN mkdir -p /home/travis/build/c-toxcore /home/travis/cache
|
||||||
|
WORKDIR /home/travis/build/c-toxcore
|
||||||
|
COPY --chown=travis:travis c-toxcore/.travis/ /home/travis/build/c-toxcore/.travis/
|
||||||
|
RUN .travis/cmake-linux install
|
||||||
|
|
||||||
|
# Now copy the rest of the sources and run the build.
|
||||||
|
COPY --chown=travis:travis . /home/travis/build/
|
||||||
|
RUN .travis/cmake-linux script
|
|
@ -1,15 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eux
|
||||||
|
|
||||||
|
STAGE="${1-cmake}"
|
||||||
|
|
||||||
readarray -t FILES <<<"$(git ls-files | sed -e 's,^,c-toxcore/,')"
|
readarray -t FILES <<<"$(git ls-files | sed -e 's,^,c-toxcore/,')"
|
||||||
|
|
||||||
|
FILES+=(c-toxcore/.git)
|
||||||
|
|
||||||
if [ -f .git ]; then
|
if [ -f .git ]; then
|
||||||
cd ..
|
FILES+=(.git/modules/c-toxcore)
|
||||||
tar -c "${FILES[@]}" "c-toxcore/.git" ".git/modules/c-toxcore" |
|
|
||||||
docker build -f c-toxcore/other/docker/Dockerfile.ci -
|
|
||||||
else
|
|
||||||
cd ..
|
|
||||||
tar -c "${FILES[@]}" "c-toxcore/.git" |
|
|
||||||
docker build -f c-toxcore/other/docker/Dockerfile.ci -
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
tar -c "${FILES[@]}" |
|
||||||
|
docker build -f "c-toxcore/other/docker/travis/Dockerfile" \
|
||||||
|
-t localbuild/travis:1.0.0 -
|
||||||
|
tar -c "${FILES[@]}" |
|
||||||
|
docker build -f "c-toxcore/other/docker/$STAGE/Dockerfile" \
|
||||||
|
-t "localbuild/$STAGE:1.0.0" -
|
||||||
|
|
|
@ -22,6 +22,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||||
&& apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" \
|
&& apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" \
|
||||||
&& apt-get update && apt-get install --no-install-recommends -y \
|
&& apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
@ -62,14 +63,3 @@ USER travis
|
||||||
ENV CC=gcc CXX=g++ \
|
ENV CC=gcc CXX=g++ \
|
||||||
PATH=/home/travis/.local/bin:$PATH \
|
PATH=/home/travis/.local/bin:$PATH \
|
||||||
TRAVIS_REPO_SLUG=TokTok/c-toxcore
|
TRAVIS_REPO_SLUG=TokTok/c-toxcore
|
||||||
|
|
||||||
# Copy minimal files to run "cmake-linux install", so we can avoid rebuilding
|
|
||||||
# astyle and other things when only source files change.
|
|
||||||
RUN mkdir -p /home/travis/build/c-toxcore /home/travis/cache
|
|
||||||
WORKDIR /home/travis/build/c-toxcore
|
|
||||||
COPY --chown=travis:travis c-toxcore/.travis/ /home/travis/build/c-toxcore/.travis/
|
|
||||||
RUN .travis/cmake-linux install
|
|
||||||
|
|
||||||
# Now copy the rest of the sources and run the build.
|
|
||||||
COPY --chown=travis:travis . /home/travis/build/
|
|
||||||
RUN .travis/cmake-linux script
|
|
Loading…
Reference in New Issue
Block a user