diff --git a/.gitignore b/.gitignore index 3f9391ab89c5aed845ab8d0b24e2ea2419876643..fa61697b4af9934a13118d895622202b80600c62 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,5 @@ *.out *.out *.toc -source/polytechnique.fdb_latexmk -source/polytechnique.fls +*.fdb_latexmk +*.fls diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 711b856ba1fde9168c89c5c912b47fb9943e2c14..63633a89aa6f1c1c18a05b036e51c8943d9adf23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,41 @@ -# This file is a template, and might need editing before it works on your project. -# use docker image with latex preinstalled -# since there is no official latex image, use https://github.com/blang/latex-docker -# possible alternative: https://github.com/natlownes/docker-latex -image: blang/latex:ctanfull +#global variables +variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -build: +stages: + - ship + - test + +test: + stage: test + image: $IMAGE_TAG script: - cd source - latex polytechnique.ins - - pdflatex polytechnique.dtx + - latexmk -pdf polytechnique.dtx - cp * ../guide/ - cd ../guide - - pdflatex installation.tex + - latexmk -pdf installation.tex artifacts: paths: - "source/polytechnique.sty" - "source/polytechnique.pdf" - "guide/installation.pdf" + + +ship:docker: + stage: ship + image: docker:stable + services: + - docker:dind + cache: {} + variables: + DOCKER_HOST: tcp://docker:2375/ + DOCKER_DRIVER: overlay2 + # For disabling TLS in docker-in-docker (not needed) + DOCKER_TLS_CERTDIR: '' + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build --pull -t $IMAGE_TAG . + - docker push $IMAGE_TAG + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f8696c1c49157ed51ce8878ec91d0f41bc904d65 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:latest +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -q \ + && apt-get install -qy build-essential wget libfontconfig1 rsync \ + && rm -rf /var/lib/apt/lists/* + +# Install TexLive with scheme-basic +RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \ + mkdir /install-tl-unx; \ + tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1; \ + echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile; \ + /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile; \ + rm -r /install-tl-unx; \ + rm install-tl-unx.tar.gz + +ENV PATH="/usr/local/texlive/2024/bin/x86_64-linux:${PATH}" +RUN . /etc/profile + +WORKDIR /data + +# Install latex packages +RUN tlmgr install latexmk babel-french csquotes xcolor titlesec lastpage hypdoc + +VOLUME ["/data"] +COPY source ./source +COPY install ./install +RUN cd install; ./unix.sh + diff --git a/guide/installation.pdf b/guide/installation.pdf index 5fd9c66605843ad122c543a949d5f0657e3af05f..d563794c3d57a9dcf9192389716adce7b1f5ff4d 100644 Binary files a/guide/installation.pdf and b/guide/installation.pdf differ diff --git a/source/polytechnique.pdf b/source/polytechnique.pdf index de544999adf2853b7ade63d1f1ab711534f0c00f..e360ce3c66a14498efedaf18d6b1c3ebfdb9aa6b 100644 Binary files a/source/polytechnique.pdf and b/source/polytechnique.pdf differ