Skip to content

Commit 9a37817

Browse files
authored
Merge pull request kevin1024#904 from kevin1024/fix-ci
Fix CI for error `unshare: write failed /proc/self/uid_map: Operation not permitted` with Ubuntu >=24.04
2 parents e313a9c + b4c65bd commit 9a37817

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
codespell:
1515
name: Check for spelling errors
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717

1818
steps:
1919
- name: Checkout

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
validate:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111

1212
steps:
1313
- uses: actions/checkout@v4

.github/workflows/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -51,6 +51,13 @@ jobs:
5151
pip install codecov '.[tests]' '${{ matrix.urllib3-requirement }}'
5252
pip check
5353
54+
- name: Allow creation of user namespaces (e.g. to the unshare command)
55+
run: |
56+
# .. so that we don't get error:
57+
# unshare: write failed /proc/self/uid_map: Operation not permitted
58+
# Idea from https://github.com/YoYoGames/GameMaker-Bugs/issues/6015#issuecomment-2135552784 .
59+
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
60+
5461
- name: Run online tests
5562
run: ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m online
5663

.github/workflows/pre-commit-detect-outdated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
pre_commit_detect_outdated:
1818
name: Detect outdated pre-commit hooks
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-24.04
2020
steps:
2121
- uses: actions/checkout@v4
2222

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
pre-commit:
1313
name: Run pre-commit
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v5

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-22.04
10+
os: ubuntu-24.04
1111
tools:
1212
python: "3.12"
1313

0 commit comments

Comments
 (0)