forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autotools build to localbuild docker images.
- Loading branch information
Showing
4 changed files
with
75 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
################################################ | ||
# autotools-linux | ||
FROM localbuild/travis | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
################################################ | ||
# cmake-linux | ||
FROM localbuild/travis | ||
|
||
# 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 | ||
|
||
################################################ | ||
# autotools-linux | ||
FROM travis AS autotools | ||
|
||
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 "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/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
set -eux | ||
|
||
STAGE="${1-cmake}" | ||
|
||
readarray -t FILES <<<"$(git ls-files | sed -e 's,^,c-toxcore/,')" | ||
|
||
FILES+=(c-toxcore/.git) | ||
|
||
if [ -f .git ]; then | ||
cd .. | ||
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 - | ||
FILES+=(.git/modules/c-toxcore) | ||
fi | ||
|
||
cd .. | ||
tar -c "${FILES[@]}" | | ||
docker build -f "c-toxcore/other/docker/travis/Dockerfile" \ | ||
-t localbuild/travis - | ||
tar -c "${FILES[@]}" | | ||
docker build -f "c-toxcore/other/docker/$STAGE/Dockerfile" \ | ||
-t "localbuild/$STAGE" - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters