From 94687472b8dff14c139608ef3626a7553192026d Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 15:04:01 +0100 Subject: [PATCH 1/6] Added ubuntu-rolling to workflow --- .github/workflows/test-install-dependencies.yml | 2 +- docs/source/_static/install_dependencies.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index e894209ab..5d541ec10 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -16,7 +16,7 @@ runs-on: ubuntu-latest strategy: matrix: - container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04"] + container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:rolling"] container: image: ${{ matrix.container_image }} steps: diff --git a/docs/source/_static/install_dependencies.sh b/docs/source/_static/install_dependencies.sh index 3b04f3507..8b633fc2c 100755 --- a/docs/source/_static/install_dependencies.sh +++ b/docs/source/_static/install_dependencies.sh @@ -188,10 +188,10 @@ elif [ -f /etc/os-release ]; then if [ $IS_ARM ]; then sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_arm_pkgs[@]}" - if [ "$version" == "13" ]; then + if [ "$version" == "13*" ]; then echo "Detected ARM Debian 13" sudo apt install -y "${debian_pkgs_23[@]}" - elif version_lte "$version" "11"; then + elif version_lte "$version" "11.99"; then echo "Using pre-22.04 ARM package list" sudo apt-get install -y ${debian_pkgs_pre22_04[@]} @@ -214,10 +214,10 @@ elif [ -f /etc/os-release ]; then else sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_pkgs[@]}" - if [ $version == "13" ]; then + if [ $version == "13*" ]; then echo "Detected Debian 13" sudo apt install -y "${debian_pkgs_23[@]}" - elif version_lte "$version" "11"; then + elif version_lte "$version" "11.99"; then echo "Using pre-22.04 package list" sudo apt-get install -y "${debian_pkgs_pre22_04[@]}" From 09cdd8d198c9153f08685386a0864534607a0955 Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 15:15:03 +0100 Subject: [PATCH 2/6] Fixing wildcard matching --- docs/source/_static/install_dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/_static/install_dependencies.sh b/docs/source/_static/install_dependencies.sh index 8b633fc2c..7298def5f 100755 --- a/docs/source/_static/install_dependencies.sh +++ b/docs/source/_static/install_dependencies.sh @@ -188,7 +188,7 @@ elif [ -f /etc/os-release ]; then if [ $IS_ARM ]; then sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_arm_pkgs[@]}" - if [ "$version" == "13*" ]; then + if [[ $version == 13* ]]; then echo "Detected ARM Debian 13" sudo apt install -y "${debian_pkgs_23[@]}" elif version_lte "$version" "11.99"; then @@ -214,7 +214,7 @@ elif [ -f /etc/os-release ]; then else sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_pkgs[@]}" - if [ $version == "13*" ]; then + if [[ $version == 13* ]]; then echo "Detected Debian 13" sudo apt install -y "${debian_pkgs_23[@]}" elif version_lte "$version" "11.99"; then From 52f0fa42c1816575034c4c088afb7fc0c40561dd Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 15:50:18 +0100 Subject: [PATCH 3/6] Create custom venv for ubuntu 23.04 --- .github/workflows/test-install-dependencies.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index 5d541ec10..af7e92629 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -32,6 +32,12 @@ ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone # Otherwise tzdata installer prompts for user input sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/source/_static/install_dependencies.sh > tmp_script.sh # Doesn't work on docker bash tmp_script.sh + - name: Create a virtual environment + if : endsWith(matrix.container_image, 'rolling') == true + run: | + python3 -m venv venv + source venv/bin/activate + pip install --upgrade pip - name: Install example requirements run: | python3 examples/install_requirements.py From f26050966068db78f10a2a1ba7eab6507148f154 Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 15:55:22 +0100 Subject: [PATCH 4/6] Install venv module --- .github/workflows/test-install-dependencies.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index af7e92629..346cad029 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -35,6 +35,7 @@ - name: Create a virtual environment if : endsWith(matrix.container_image, 'rolling') == true run: | + sudo apt-get install -y python3-venv python3 -m venv venv source venv/bin/activate pip install --upgrade pip From c9b1a4c187214df8971100a2f3adfe5be82fbf2a Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 16:08:08 +0100 Subject: [PATCH 5/6] Changing source to '.' --- .github/workflows/test-install-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index 346cad029..65b5a16a2 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -37,7 +37,7 @@ run: | sudo apt-get install -y python3-venv python3 -m venv venv - source venv/bin/activate + . venv/bin/activate pip install --upgrade pip - name: Install example requirements run: | From 95085a1f502de0d8a20f88d5c89b9f7793e93a0c Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Mon, 4 Mar 2024 16:21:25 +0100 Subject: [PATCH 6/6] Forcing bash shell --- .github/workflows/test-install-dependencies.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index 65b5a16a2..7300ddb8b 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -33,13 +33,16 @@ sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/source/_static/install_dependencies.sh > tmp_script.sh # Doesn't work on docker bash tmp_script.sh - name: Create a virtual environment - if : endsWith(matrix.container_image, 'rolling') == true + if: endsWith(matrix.container_image, 'rolling') == true run: | sudo apt-get install -y python3-venv python3 -m venv venv . venv/bin/activate pip install --upgrade pip + python3 examples/install_requirements.py + shell: bash - name: Install example requirements + if: endsWith(matrix.container_image, 'rolling') == false run: | python3 examples/install_requirements.py test_macos: