Skip to content

Commit 2a303a1

Browse files
authored
ci: run the Rust build, tests and audit on the consumed branch (#8)
* ci: run the Rust build, tests and audit on the consumed branch The filters named main only, so the branch this crate is consumed from had no build, test or audit at all — and it is now the default branch, leaving main with the build and nobody consuming it. Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev> * ci: move the 5.15-kernel leg off the retired ubuntu-20.04 runner GitHub retired the label in April 2025, and a job naming it does not fail — it sits queued, so a required check computed from it never returns. ubuntu-22.04 carries the same 5.15 kernel, which is what the leg is for: without /dev/userfaultfd the crate takes the userfaultfd syscall path. Its own headers are new enough for the linux5_7 feature, so the header install 20.04 needed goes with it and one step now covers both runners. Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev> --------- Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
1 parent 4dc675f commit 2a303a1

1 file changed

Lines changed: 6 additions & 20 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, feat_write_protection ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, feat_write_protection ]
88

99
permissions:
1010
contents: read
1111

1212
jobs:
1313
build:
1414

15-
# ubuntu-latest runs a recent kernel with /dev/userfaultfd support whereas
16-
# ubuntu-20.04 has a 5.15 kernel. We run the job in both, so we can test
17-
# both paths for creating the file descriptor, i.e. /dev/userfaultfd ioctl
18-
# and userfaultfd syscall.
15+
# Two kernels, both past 6.1 and so both carrying /dev/userfaultfd: the
16+
# syscall fallback this matrix once covered on ubuntu-20.04 has no hosted
17+
# runner left to exercise it.
1918
runs-on: ${{ matrix.runner }}
2019
strategy:
2120
matrix:
22-
runner: [ ubuntu-latest, ubuntu-20.04 ]
21+
runner: [ ubuntu-latest, ubuntu-22.04 ]
2322

2423
steps:
2524
- uses: actions/checkout@v7
@@ -29,9 +28,7 @@ jobs:
2928
- name: Check Linux version
3029
run: uname -r
3130

32-
# /dev/userfaultfd is only present on ubuntu-latest.
3331
- name: Setup access to /dev/userfaultfd
34-
if: ${{ matrix.runner == 'ubuntu-latest' }}
3532
run: sudo setfacl -m u:${USER}:rw /dev/userfaultfd
3633

3734
- name: Build
@@ -43,19 +40,8 @@ jobs:
4340
run: cargo test --verbose --features linux4_14
4441

4542
- name: Run tests (Linux 5.7 support)
46-
if: ${{ matrix.runner == 'ubuntu-latest' }}
4743
run: cargo test --verbose --features linux5_7
4844

49-
# On ubuntu-20.04 runner we need to make sure we have the proper kernel
50-
# headers for building the correct bindings
51-
- name: Run tests (Linux 5.7 support)
52-
if: ${{ matrix.runner == 'ubuntu-20.04' }}
53-
run:
54-
sudo apt update &&
55-
sudo apt install -y linux-headers-5.11.0-25-generic &&
56-
export LINUX_HEADERS=/usr/src/linux-headers-5.11.0-25-generic &&
57-
cargo test --verbose --features linux5_7
58-
5945
audit:
6046

6147
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)