From e662c666d80c544294772ec67a407d5682112c70 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:00:44 +0100 Subject: [PATCH 01/13] Testing sphinx-ci image --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fe0ba21ef..9ef114daf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,10 @@ jobs: PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners PYMAPDL_START_INSTANCE: FALSE ON_DOCUMENTATION: TRUE + + container: + image: ghcr.io/sphinx-doc/sphinx-ci + steps: - name: "Install Git and checkout project" uses: actions/checkout@v4 @@ -168,7 +172,7 @@ jobs: - name: "Install OS packages" run: | sudo apt update - sudo apt install zip pandoc libgl1-mesa-glx xvfb texlive-latex-extra latexmk graphviz texlive-xetex texlive-fonts-extra qpdf texlive-xetex xindy + sudo apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy - name: "Test virtual framebuffer" run: | From 239d6480b1931c67f43215534a31139ac234e312 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:01:37 +0100 Subject: [PATCH 02/13] removing extra space --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ef114daf2..8359c5f4fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -171,8 +171,8 @@ jobs: - name: "Install OS packages" run: | - sudo apt update - sudo apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy + sudo apt update + sudo apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy - name: "Test virtual framebuffer" run: | From 15c72738b1ba37d7a926fa94a690ec5b82195819 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:15:53 +0100 Subject: [PATCH 03/13] Installing docker externally --- .ci/install_docker.sh | 17 +++++++++++++++++ .github/workflows/ci.yml | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 .ci/install_docker.sh diff --git a/.ci/install_docker.sh b/.ci/install_docker.sh new file mode 100644 index 0000000000..ae88843ec9 --- /dev/null +++ b/.ci/install_docker.sh @@ -0,0 +1,17 @@ +echo "Adding Docker's official GPG key..." +apt-get update -y +apt-get install -y ca-certificates curl gnupg +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +chmod a+r /etc/apt/keyrings/docker.gpg + +echo "Adding the repository to Apt sources..." +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null + +echo "Installing..." +apt-get update -y + +apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8359c5f4fa..0f7d415f6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,6 +122,15 @@ jobs: - name: "Install Git and checkout project" uses: actions/checkout@v4 + - name: Installing docker + run: | + chmod +x .ci/install_docker.sh + ./.ci/install_docker.sh + + - name: Test docker + run: | + docker version + - name: "Login in Github container registry" uses: docker/login-action@v3.0.0 with: From ca20825f7be56e9d6ff7e5047a8ba2ca4dd52e35 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:19:56 +0100 Subject: [PATCH 04/13] removing sudo --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f7d415f6a..f531b293a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,8 +180,8 @@ jobs: - name: "Install OS packages" run: | - sudo apt update - sudo apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy + apt update + apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy - name: "Test virtual framebuffer" run: | From 9af3aa587e4e143be33aecb83ec3625c83e33c69 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:25:05 +0100 Subject: [PATCH 05/13] auto -y --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f531b293a2..f8386b0375 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,7 +181,7 @@ jobs: - name: "Install OS packages" run: | apt update - apt install zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy + apt install -y zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy - name: "Test virtual framebuffer" run: | From b9e3fce463e2e3d9e21edbf75d88085a08f37e28 Mon Sep 17 00:00:00 2001 From: German Date: Sat, 9 Mar 2024 18:41:26 +0100 Subject: [PATCH 06/13] Fixing pip --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8386b0375..4d4ec8b794 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -434,7 +434,7 @@ jobs: - name: "Test virtual framebuffer" run: | - pip install -r .ci/requirements_test_xvfb.txt + python -m pip install -r .ci/requirements_test_xvfb.txt xvfb-run python .ci/display_test.py - name: Install ansys-mapdl-core @@ -494,8 +494,8 @@ jobs: - name: "Check package" run: | - pip install twine - twine check dist/* + python -m pip install twine + python -m twine check dist/* - name: "Upload wheel and binaries" uses: actions/upload-artifact@v4 From 7a92dd939a5ec494f5f7994fc6f137217a79b4fa Mon Sep 17 00:00:00 2001 From: German Date: Sun, 10 Mar 2024 17:28:18 +0100 Subject: [PATCH 07/13] Adding python --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d4ec8b794..451d23a378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,12 +185,12 @@ jobs: - name: "Test virtual framebuffer" run: | - pip install -r .ci/requirements_test_xvfb.txt + python -m pip install -r .ci/requirements_test_xvfb.txt xvfb-run python .ci/display_test.py - name: "Install ansys-mapdl-core" run: | - pip install . + python -m pip install . xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())" - name: "Retrieve PyMAPDL version" @@ -228,7 +228,7 @@ jobs: - name: "Install docs build requirements" run: | - pip install .[doc] + python -m pip install .[doc] - name: "Waiting for the services to be up" run: | @@ -334,7 +334,6 @@ jobs: run: cat log.txt || echo "MAPDL log could not be found." - build-test: name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" runs-on: ubuntu-latest From f176f8eba76ae6d4f35264c8c1974908fc9a6782 Mon Sep 17 00:00:00 2001 From: German Date: Sun, 10 Mar 2024 17:47:22 +0100 Subject: [PATCH 08/13] adding nc installation --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 451d23a378..49da33b554 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,7 +181,7 @@ jobs: - name: "Install OS packages" run: | apt update - apt install -y zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy + apt install -y zip pandoc libgl1-mesa-glx xvfb latexmk qpdf xindy netcat - name: "Test virtual framebuffer" run: | From feac1ba219264a4799d1126de839e3fe8c2f9e75 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 11 Mar 2024 12:23:15 +0100 Subject: [PATCH 09/13] fixing codacy suggestions --- .ci/install_docker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/install_docker.sh b/.ci/install_docker.sh index ae88843ec9..b9c95fe5a4 100644 --- a/.ci/install_docker.sh +++ b/.ci/install_docker.sh @@ -1,3 +1,4 @@ +#!/bin/bash echo "Adding Docker's official GPG key..." apt-get update -y apt-get install -y ca-certificates curl gnupg From 64cbc71722f45392ffb140986996fd57a629bc1b Mon Sep 17 00:00:00 2001 From: German Date: Mon, 11 Mar 2024 12:25:16 +0100 Subject: [PATCH 10/13] removing license server --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49da33b554..0044240463 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,7 +141,6 @@ jobs: - name: "Pull, launch, and validate MAPDL service" id: start_mapdl env: - LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} DISTRIBUTED_MODE: "dmp" run: | From 7123188035b8505061bc1e9f48d82f9405b58c09 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 11 Mar 2024 12:35:28 +0100 Subject: [PATCH 11/13] Uploading mapdl launch log --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0044240463..1b08a1fe2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,6 +318,7 @@ jobs: run: | cp -f doc/_build/latex/*.log ./logs-build-docs/ || echo "Latex logs could not be found." + cp mapdl_launch.log ./logs-build-docs/mapdl_launch.log || echo "MAPDL log not found." cp log.txt ./logs-build-docs/ || echo "MAPDL log could not be found." tar cvzf ./logs-build-docs.tgz ./logs-build-docs From d4ae141e84160ca8dee72383c97cb02881476920 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 11 Mar 2024 13:04:05 +0100 Subject: [PATCH 12/13] using timeout --- .ci/waiting_services.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/waiting_services.sh b/.ci/waiting_services.sh index b2050ef89d..066b0e5b2d 100755 --- a/.ci/waiting_services.sh +++ b/.ci/waiting_services.sh @@ -11,9 +11,8 @@ done echo "::endgroup::" echo "MAPDL service is up!" -echo "::group:: Waiting for the DPF port to be open..." -while ! nc -z localhost "$DPF_PORT"; do - sleep 0.1 -done +echo "::group:: Waiting for the DPF port to be open..." +timeout 5m bash -c "while ! nc -z localhost "$DPF_PORT"; do sleep 1 done" + echo "::endgroup::" echo "DPF service is up!" \ No newline at end of file From 73ae7f95b79b41f41396b148a01a2fe0c82725ee Mon Sep 17 00:00:00 2001 From: German Date: Mon, 11 Mar 2024 13:10:58 +0100 Subject: [PATCH 13/13] unquoting --- .ci/waiting_services.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/waiting_services.sh b/.ci/waiting_services.sh index 066b0e5b2d..30bfe89b80 100755 --- a/.ci/waiting_services.sh +++ b/.ci/waiting_services.sh @@ -12,7 +12,7 @@ echo "::endgroup::" echo "MAPDL service is up!" echo "::group:: Waiting for the DPF port to be open..." -timeout 5m bash -c "while ! nc -z localhost "$DPF_PORT"; do sleep 1 done" +timeout 5m bash -c "while ! nc -z localhost $DPF_PORT; do sleep 1 done" echo "::endgroup::" echo "DPF service is up!" \ No newline at end of file