forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer using :sources, since that fails on render.com.
- Loading branch information
Showing
7 changed files
with
82 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ===== custom ===== | ||
!docs/Doxyfile |
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,19 +1,20 @@ | ||
FROM toxchat/c-toxcore:sources AS sources | ||
FROM alpine:3.19.0 AS build | ||
FROM toxchat/doxygen:latest AS build | ||
|
||
ENV LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
LC_CTYPE=en_US.UTF-8 \ | ||
LC_ALL=en_US.UTF-8 | ||
RUN ["apk", "add", "--no-cache", \ | ||
"gtest-dev", \ | ||
"libconfig-dev", \ | ||
"libsodium-dev", \ | ||
"libvpx-dev", \ | ||
"opus-dev"] | ||
|
||
RUN apk add --no-cache doxygen git graphviz texlive \ | ||
&& git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/doxygen-awesome-css | ||
WORKDIR /work | ||
COPY --from=sources /src/ /work/ | ||
COPY docs/Doxyfile /work/Doxyfile | ||
RUN echo "WARN_AS_ERROR = YES" >> Doxyfile \ | ||
RUN git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/c-toxcore/doxygen-awesome-css | ||
|
||
WORKDIR /work/c-toxcore | ||
COPY . /work/c-toxcore/ | ||
RUN cmake . -B_build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
&& echo "WARN_AS_ERROR = YES" >> Doxyfile \ | ||
&& sed -i -e 's/^non_null([^)]*) *//;s/^nullable([^)]*) *//' $(find . -name "*.[ch]") \ | ||
&& doxygen Doxyfile | ||
&& doxygen docs/Doxyfile | ||
|
||
FROM nginx:alpine | ||
COPY --from=build /work/_docs/html/ /usr/share/nginx/html/ | ||
COPY --from=build /work/c-toxcore/_docs/html/ /usr/share/nginx/html/ |
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,25 @@ | ||
# ===== common ===== | ||
# Ignore everything ... | ||
**/* | ||
# ... except sources | ||
!**/*.[ch] | ||
!**/*.cc | ||
!**/*.hh | ||
!CHANGELOG.md | ||
!LICENSE | ||
!README.md | ||
!auto_tests/data/* | ||
!other/bootstrap_daemon/bash-completion/** | ||
!other/bootstrap_daemon/tox-bootstrapd.* | ||
!other/proxy/*.mod | ||
!other/proxy/*.sum | ||
!other/proxy/*.go | ||
# ... and CMake build files (used by most builds). | ||
!**/CMakeLists.txt | ||
!.github/scripts/flags*.sh | ||
!cmake/*.cmake | ||
!other/pkgconfig/* | ||
!other/rpm/* | ||
!so.version | ||
# ===== custom ===== | ||
!docs/Doxyfile |
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,8 +1,4 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
BUILD=doxygen | ||
other/docker/sources/build | ||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . | ||
#!/usr/bin/env bash | ||
|
||
. "$(cd "$(dirname "${BASH_SOURCE[0]}")/../sources" && pwd)/run.sh" | ||
docker run --name toxcore-doxygen --rm -it -p "28192:80" "toxchat/c-toxcore:$BUILD" |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Common docker build script usable by many builds in the other/docker | ||
# directory. We're using a common dockerignore that ignores everything except | ||
# sources and CMake scripts. Subdirectories can contain a "dockerignore" file | ||
# (note the missing "." at the start) that will be pasted to the end of the | ||
# common dockerignore file. This way, we can use "COPY ." and get all the | ||
# files we need at once, which is much faster, more flexible, and less | ||
# error-prone than manually writing lots of COPY directives. | ||
|
||
SOURCESDIR="$(dirname "${BASH_SOURCE[0]}")" | ||
DOCKERDIR="$(dirname "${BASH_SOURCE[1]}")" | ||
BUILD="$(basename "$DOCKERDIR")" | ||
|
||
set -eux | ||
cat "$SOURCESDIR/sources.Dockerfile.dockerignore" >"$DOCKERDIR/$BUILD.Dockerfile.dockerignore" | ||
if [ -f "$DOCKERDIR/dockerignore" ]; then | ||
cat "$DOCKERDIR/dockerignore" >>"$DOCKERDIR/$BUILD.Dockerfile.dockerignore" | ||
fi | ||
|
||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . |
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,3 +1,4 @@ | ||
# ===== common ===== | ||
# Ignore everything ... | ||
**/* | ||
# ... except sources | ||
|