From b94a184e4b66ca9dff72eca13fb1e7a3d0ce65f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drik=20Fuoco?= <105517825+cedrik-fuoco-adsk@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:57:09 -0500 Subject: [PATCH] Tentative fix for the doxygen installation in the CI (Windows) (#1890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco Co-authored-by: Doug Walker --- .github/workflows/dependencies_latest.yml | 5 ++++- share/ci/scripts/windows/install_docs_env.sh | 3 ++- share/ci/scripts/windows/install_doxygen.sh | 20 ++++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index fe729a4fe..0b59bd877 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -292,7 +292,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install docs env - run: share/ci/scripts/windows/install_docs_env.sh + run: | + DOXYGEN_PATH=$GITHUB_WORKSPACE/doxygen + share/ci/scripts/windows/install_docs_env.sh "$DOXYGEN_PATH" + echo "$DOXYGEN_PATH" >> $GITHUB_PATH shell: bash if: matrix.build-docs == 'ON' - name: Install tests env diff --git a/share/ci/scripts/windows/install_docs_env.sh b/share/ci/scripts/windows/install_docs_env.sh index 30662eeb9..db18dd2fb 100755 --- a/share/ci/scripts/windows/install_docs_env.sh +++ b/share/ci/scripts/windows/install_docs_env.sh @@ -5,6 +5,7 @@ set -ex HERE=$(dirname $0) +DOXYGEN_LOCATION="$1" -bash $HERE/install_doxygen.sh latest +bash $HERE/install_doxygen.sh "$DOXYGEN_LOCATION" pip install -r $HERE/../../../../docs/requirements.txt diff --git a/share/ci/scripts/windows/install_doxygen.sh b/share/ci/scripts/windows/install_doxygen.sh index 5bbbded09..a08783f76 100755 --- a/share/ci/scripts/windows/install_doxygen.sh +++ b/share/ci/scripts/windows/install_doxygen.sh @@ -4,10 +4,18 @@ set -ex -DOXYGEN_VERSION="$1" +DOXYGEN_LOCATION="$1" -if [ "$DOXYGEN_VERSION" == "latest" ]; then - choco install doxygen.install -else - choco install doxygen.install --version=${DOXYGEN_VERSION} -fi +# Utility to parse JSON object. +choco install jq + +# Get the URL of the latest zip package for Doxygen. +url=$(curl -s 'https://api.github.com/repos/doxygen/doxygen/releases/latest' | jq -r '.assets[] | select(.name | test("doxygen-.*windows.x64.bin.zip")) | .browser_download_url') + +# Download the zip. +mkdir $DOXYGEN_LOCATION +cd $DOXYGEN_LOCATION +powershell 'iwr -URI '$url' -OutFile doxygen.zip' + +# Unzip the file into $DOXYGEN_LOCATION. +unzip -o doxygen.zip \ No newline at end of file