1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
# NS3 CI script for the documentation
# For the moment we do not install the generated documentation
.doc:
stage: documentation
before_script:
- pacman-key --init
- pacman -Syu --noconfirm
python python-sphinx make libxml2-legacy
graphviz imagemagick libx264
texlive-basic texlive-bin texlive-binextra texlive-latexextra texlive-fontutils texlive-fontsrecommended texlive-mathscience
# dia is archived
- pacman --noconfirm -U
https://archive.archlinux.org/packages/g/gtk2/gtk2-2.24.33-5-x86_64.pkg.tar.zst
https://archive.archlinux.org/packages/d/dia/dia-0.97.3-9-x86_64.pkg.tar.zst
# no policy is a good policy.
- mv /etc/ImageMagick-7/policy.xml /etc/ImageMagick-7/policy.xml.bak
# - sed -i "s/EPS,PDF,//g" /etc/ImageMagick-7/policy.xml
# - sed -i "s/none/read\ |\ write/g" /etc/ImageMagick-7/policy.xml
image: archlinux
timeout: 2h
interruptible: true
dependencies: []
doxygen-1.15:
extends: .doc
script:
# Install Doxygen and dependencies to build ns-3
- pacman -Syu --noconfirm
base-devel ninja cmake python ccache gsl gtk3 boost openmpi openssh inetutils git
- pacman --noconfirm -U https://archive.archlinux.org/packages/d/doxygen/doxygen-1.15.0-2-x86_64.pkg.tar.zst
# Build ns-3.
# Debug build is the fastest, and we do not need to actually execute anything, just the examples for introspection.
- mkdir -p $CCACHE_BASEDIR_VALUE
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/$CCACHE_BASEDIR_VALUE
- export MPI_CI=1
- CXX=g++ ./ns3 configure -d debug -GNinja --enable-examples --enable-tests --enable-asserts --enable-mpi
- ./ns3 build
- ./ns3 build assemble-introspected-command-line
# The following four lines were needed when ns-3 had warnings, and
# it was necessary to have a filter to check only the files touched by a MR.
# - git remote add ns-3-origin https://gitlab.com/nsnam/ns-3-dev.git || true
# - git fetch ns-3-origin
# - export CHANGED_FILES=$(git diff --name-only ns-3-origin/master --diff-filter=d | tr '\n' ' ' | sed 's/ $//g;s/ /\\\|/g')
# - doc/doxygen.warnings.report.sh -f "$CHANGED_FILES"
- doc/doxygen.warnings.report.sh
# Clean the build directory
- ./ns3 clean
# Print the Doxygen version - just to double check what has been used.
- echo "Doxygen version $(doxygen -v)"
# Check the generated documentation files
- python3 utils/check-style-clang-format.py --no-formatting --no-tabs doc/introspected-doxygen.h doc/introspected-command-line.h
cache:
# Reuse the ccache from the per-commit-gcc-debug job
key: "ccache-per-commit-gcc-debug"
paths:
- $CCACHE_BASEDIR_VALUE/
policy: pull
variables:
CCACHE_BASEDIR_VALUE: ns-3-ccache-storage
artifacts:
paths:
- doc/doxygen.warnings.log
when: always
.sphinx-doc:
extends: .doc
script:
# - mkdir -p public/$DOC_DIR
- cd doc/$DOC_DIR
- make html
- make latexpdf
# - mv build/html ../../public/$DOC_DIR
# - mv build/latex/ns-3-$DOC_DIR.pdf ../../public/
manual:
extends: .sphinx-doc
variables:
DOC_DIR: manual
tutorial:
extends: .sphinx-doc
variables:
DOC_DIR: tutorial
models:
extends: .sphinx-doc
variables:
DOC_DIR: models
contributing:
extends: .sphinx-doc
variables:
DOC_DIR: contributing
installation:
extends: .sphinx-doc
variables:
DOC_DIR: installation
|