forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use docker for the autotools ci build.
This makes it easier to run it locally for testing and ensures the dockerfile continues to work.
- Loading branch information
Showing
4 changed files
with
24 additions
and
31 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
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
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
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,23 +1,32 @@ | ||
################################################ | ||
# autotools-linux | ||
FROM localbuild/travis:1.0.0 | ||
FROM ubuntu:20.04 | ||
|
||
USER root | ||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
autoconf \ | ||
automake \ | ||
ca-certificates \ | ||
curl \ | ||
libconfig-dev \ | ||
libopus-dev \ | ||
libtool \ | ||
libvpx-dev \ | ||
make \ | ||
pkg-config \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
USER travis | ||
|
||
RUN groupadd -r -g 1000 builder \ | ||
&& useradd -m --no-log-init -r -g builder -u 1000 builder | ||
USER builder | ||
|
||
# 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 mkdir -p /home/builder/build/c-toxcore /home/builder/cache | ||
WORKDIR /home/builder/build/c-toxcore | ||
COPY --chown=builder:builder .travis/ /home/builder/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 | ||
COPY --chown=builder:builder . /home/builder/build/c-toxcore/ | ||
RUN CC=gcc .travis/autotools-linux script |