From 93bc59508c5a60520c698c18f4bbd247d60f5511 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 17 Jan 2025 20:15:33 +0100 Subject: [PATCH 1/2] Pin GitHub Actions and Read the Docs to explicit Ubuntu 24.04 --- .github/workflows/codespell.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/pre-commit-detect-outdated.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .readthedocs.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index c5e1604..40a1077 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -13,7 +13,7 @@ permissions: jobs: codespell: name: Check for spelling errors - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f0b51b6..fc27bff 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,7 @@ on: jobs: validate: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 831c8c7..372cc6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/pre-commit-detect-outdated.yml b/.github/workflows/pre-commit-detect-outdated.yml index b7dfadf..ea2ccf8 100644 --- a/.github/workflows/pre-commit-detect-outdated.yml +++ b/.github/workflows/pre-commit-detect-outdated.yml @@ -16,7 +16,7 @@ permissions: jobs: pre_commit_detect_outdated: name: Detect outdated pre-commit hooks - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e6be623..899a904 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,7 +11,7 @@ on: jobs: pre-commit: name: Run pre-commit - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 84d2691..958cc2d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.12" From b4c65bd677cb2b7c289d5842ac2b638201305b88 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 17 Jan 2025 20:21:13 +0100 Subject: [PATCH 2/2] main.yml: Allow creation of user namespaces to unshare in Ubuntu >=24.04 --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 372cc6a..7a2116e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,6 +51,13 @@ jobs: pip install codecov '.[tests]' '${{ matrix.urllib3-requirement }}' pip check + - name: Allow creation of user namespaces (e.g. to the unshare command) + run: | + # .. so that we don't get error: + # unshare: write failed /proc/self/uid_map: Operation not permitted + # Idea from https://github.com/YoYoGames/GameMaker-Bugs/issues/6015#issuecomment-2135552784 . + sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 + - name: Run online tests run: ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m online