From 1b21f5fc1a54550675072d672422856a04aea48d Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Tue, 27 Aug 2024 10:23:49 +0200 Subject: [PATCH] ci: Install Doxygen in container and use for doc deployment --- .github/workflows/publish-docs.yml | 20 ++++++++------------ util/container/Dockerfile | 7 +++++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 857e27a669..cf15230125 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -10,20 +10,16 @@ jobs: deploy: name: Deploy documentation runs-on: ubuntu-22.04 + container: + image: ghcr.io/pulp-platform/snitch_cluster:doxygen-docs steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - uses: mattnotmitt/doxygen-action@v1 - with: - working-directory: sw/ - - name: bender install - uses: pulp-platform/pulp-actions/bender-install@v2 - with: - version: 0.27.1 - - name: Install Python requirements - run: pip install -r python-requirements.txt + # For some reason, the checkout is done by a different user, + # than that deploying to Github (root, possibly due to Docker). + # So we need to set the repository as a safe directory. + - name: Git config safe.directory + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE - name: Generate documentation sources run: | make doc-srcs diff --git a/util/container/Dockerfile b/util/container/Dockerfile index f6e98f7135..19edfa5267 100644 --- a/util/container/Dockerfile +++ b/util/container/Dockerfile @@ -11,6 +11,7 @@ ARG PYTHON_VERSION=3.9.12 ARG BENDER_VERSION=0.27.1 ARG SPIKE_DASM_VERSION=0.1.0 ARG VERILATOR_VERSION=5.006 +ARG DOXYGEN_VERSION=1.12.0 # Run dpkg without interactive dialogue ARG DEBIAN_FRONTEND=noninteractive @@ -90,6 +91,10 @@ RUN tar xzf bender-${BENDER_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz RUN wget https://github.com/pulp-platform/riscv-isa-sim/releases/download/snitch-v${SPIKE_DASM_VERSION}/snitch-spike-dasm-${SPIKE_DASM_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz RUN tar xzf snitch-spike-dasm-${SPIKE_DASM_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz +# Install Doxygen +RUN wget https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz +RUN tar xzf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz + # 2. Stage FROM ubuntu:22.04 AS snitch_cluster ARG SNITCH_LLVM_VERSION=latest @@ -146,9 +151,11 @@ RUN apt-get update && apt-get install software-properties-common -y && \ # Copy artifacts from stage 1. COPY --from=builder /tools/bender bin/ COPY --from=builder /tools/spike-dasm bin/ +COPY --from=builder /tools/spike-dasm bin/ COPY --from=builder /root/.cargo/bin/banshee bin/ COPY --from=builder /opt/python /opt/python COPY --from=builder /tools/verilator /tools/verilator/ +COPY --from=builder /tools/doxygen-${DOXYGEN_VERSION}/bin/doxygen bin/ # Create and activate virtual environment ENV VIRTUAL_ENV "/root/.venvs/snitch_cluster"