Skip to content

Commit

Permalink
test: switch from ubuntu-22.04 to 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored and audgirka committed Nov 11, 2024
1 parent 04e8b48 commit 8803ca0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 23 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run:
shell: ${{ matrix.shell || 'bash'}}
# The type of runner that the job will run on
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
# see https://github.com/containers/podman/issues/13609
continue-on-error: ${{ contains(matrix.name, 'macos') && true || false }}
outputs:
Expand All @@ -61,15 +61,15 @@ jobs:
continue-on-error:
- false
os:
- ubuntu-22.04
- ubuntu-24.04
task-name:
- docs
name:
- docs
include:
- name: lint
task-name: lint
os: ubuntu-22.04
os: ubuntu-24.04
env:
SKIP_PODMAN: 1
SKIP_DOCKER: 1
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
if: contains(matrix.shell, 'wsl')
uses: Vampire/[email protected]
with:
distribution: Ubuntu-22.04
distribution: Ubuntu-24.04
set-as-default: "true"
# '-i' seems to be the only option that loads .bashrc file that we need
# https://github.com/Vampire/setup-wsl/discussions/54
Expand All @@ -130,6 +130,7 @@ jobs:
dbus
dirmngr
gawk
gcc
git
gpg
gpg-agent
Expand Down Expand Up @@ -318,7 +319,7 @@ jobs:
id-token: write
checks: read

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Merge logs into a single archive
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ submodules:
recursive: true

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: >- # PyYAML parses it as float `3.1` it it's not an explicit string
3.10
3.12
# Optionally set the version of Python and requirements required
# to build docs
Expand Down
37 changes: 21 additions & 16 deletions tools/test-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# cSpell:ignore RPMS xorg cmdtest corepack xrandr nocolor
# cSpell:ignore RPMS xorg cmdtest corepack xrandr nocolor userns
#
# This tool is used to setup the environment for running the tests. Its name
# name and location is based on Zuul CI, which can automatically run it.
Expand Down Expand Up @@ -118,11 +118,31 @@ if [[ -f "/etc/redhat-release" ]]; then
fi
fi

# Fail-fast if run on Windows or under WSL1/2 on /mnt/c because it is so slow
# that we do not support it at all. WSL use is ok, but not on mounts.
WSL=0
if [[ "${OS:-}" == "windows" ]]; then
log error "You cannot use Windows build tools for development, try WSL."
exit 1
fi
if grep -qi microsoft /proc/version >/dev/null 2>&1; then
# resolve pwd symlinks and ensure than we do not run under /mnt (mount)
if [[ "$(pwd -P || true)" == /mnt/* ]]; then
log warning "Under WSL, you must avoid running from mounts (/mnt/*) due to critical performance issues."
fi
WSL=1
fi

if [[ -f "/usr/bin/apt-get" ]]; then
INSTALL=0
# qemu-user-static is required by podman on arm64
# python3-dev is needed for headers as some packages might need to compile

if [[ "$WSL" == "0" ]] && [[ "$(sysctl -n kernel.apparmor_restrict_unprivileged_userns)" != "0" ]]; then
log warning "AppArmor restricts unprivileged user namespaces, disabling it for testing. See https://github.com/redhat-developer/vscode-extension-tester/issues/1496"
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi

DEBS=(curl git python3-dev python3-venv python3-pip qemu-user-static xvfb x11-xserver-utils libgbm-dev libssh-dev libonig-dev)
# add nodejs to DEBS only if node is not already installed because
# GHA has newer versions preinstalled and installing the rpm would
Expand Down Expand Up @@ -191,21 +211,6 @@ if [[ "${OS:-}" == "darwin" && "${SKIP_PODMAN:-}" != '1' ]]; then
}
fi

# Fail-fast if run on Windows or under WSL1/2 on /mnt/c because it is so slow
# that we do not support it at all. WSL use is ok, but not on mounts.
WSL=0
if [[ "${OS:-}" == "windows" ]]; then
log error "You cannot use Windows build tools for development, try WSL."
exit 1
fi
if grep -qi microsoft /proc/version >/dev/null 2>&1; then
# resolve pwd symlinks and ensure than we do not run under /mnt (mount)
if [[ "$(pwd -P || true)" == /mnt/* ]]; then
log warning "Under WSL, you must avoid running from mounts (/mnt/*) due to critical performance issues."
fi
WSL=1
fi

# User specific environment
if ! [[ "${PATH}" == *"${HOME}/.local/bin"* ]]; then
# shellcheck disable=SC2088
Expand Down

0 comments on commit 8803ca0

Please sign in to comment.