From a8837043791ea0ee9a3561c57d635582db9f4565 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 10 Jul 2022 14:41:45 -0400 Subject: [PATCH] Add the initial doxygen Dockerfile --- .gitlab-ci.yml | 1 + .gitlab/doxygen.yml | 16 ++++++++++++++++ doxygen/doxygen.Dockerfile | 22 ++++++++++++++++++++++ doxygen/doxygen.Dockerfile.dockerignore | 6 ++++++ 4 files changed, 45 insertions(+) create mode 100644 .gitlab/doxygen.yml create mode 100644 doxygen/doxygen.Dockerfile create mode 100644 doxygen/doxygen.Dockerfile.dockerignore diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e131dc9f21..0a9b875b88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,3 +43,4 @@ include: #- local: '/.gitlab/Windows-CI.yml' - local: '/.gitlab/coverity.yml' - local: '/.gitlab/linux-metadata-validate.yml' + - local: '/.gitlab/doxygen.yml' diff --git a/.gitlab/doxygen.yml b/.gitlab/doxygen.yml new file mode 100644 index 0000000000..7d670e4fda --- /dev/null +++ b/.gitlab/doxygen.yml @@ -0,0 +1,16 @@ +build_doxygen_docker: + image: docker:stable + services: + - docker:dind + stage: build + before_script: + - docker info + - docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY" + script: + - docker build -t "${CI_REGISTRY_IMAGE}-doxygen:$CI_COMMIT_BRANCH" -f ./doxygen/doxygen.Dockerfile . + - docker push "${CI_REGISTRY_IMAGE}-doxygen:$CI_COMMIT_BRANCH" + only: + refs: + - schedules + variables: + - $SCHEDULED_JOB_NAME == "doxygen" \ No newline at end of file diff --git a/doxygen/doxygen.Dockerfile b/doxygen/doxygen.Dockerfile new file mode 100644 index 0000000000..89ab2c398c --- /dev/null +++ b/doxygen/doxygen.Dockerfile @@ -0,0 +1,22 @@ +FROM registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:34 as build-doxygen-env +USER root + +WORKDIR /src +COPY . ./ + +RUN ls +RUN mkdir build && cd build + +WORKDIR /src/build + +RUN cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DKICAD_USE_OCC=ON \ + -DKICAD_SPICE=ON +RUN make doxygen-docs +RUN make doxygen-python + + +FROM scratch as output-image + +COPY --from=build-doxygen-env /src/doxygen/out/html /doxygen-docs_html +COPY --from=build-doxygen-env /src/build/pcbnew/doxygen-python/html /doxygen-python_html diff --git a/doxygen/doxygen.Dockerfile.dockerignore b/doxygen/doxygen.Dockerfile.dockerignore new file mode 100644 index 0000000000..f1bf199ce3 --- /dev/null +++ b/doxygen/doxygen.Dockerfile.dockerignore @@ -0,0 +1,6 @@ +.git +.gitlab +.github +.idea +.vs +build \ No newline at end of file