Check that PRs dont introduce more mypy --strict errors (#3416)

* correct yaml indentation

* compare pr errors

* fix bug, better diag

---------

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
pull/3477/head
k4lizen 3 days ago committed by GitHub
parent 832a009864
commit df1aaf3636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,10 +2,10 @@ name: Test Docker
on: on:
pull_request: pull_request:
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
jobs: jobs:
docker_x86-64: docker_x86-64:
@ -17,29 +17,29 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for docker images - name: Cache for docker images
uses: jpribyl/action-docker-layer-caching@v0.1.1 uses: jpribyl/action-docker-layer-caching@v0.1.1
# Ignore the failure of a step and avoid terminating the job. # Ignore the failure of a step and avoid terminating the job.
continue-on-error: true continue-on-error: true
with: with:
key: ${{ matrix.images }}-cache-images-{hash} key: ${{ matrix.images }}-cache-images-{hash}
- name: Docker Build ${{ matrix.images }} - name: Docker Build ${{ matrix.images }}
run: docker compose build ${{ matrix.images }} run: docker compose build ${{ matrix.images }}
- name: Run GDB Tests on ${{ matrix.images }} - name: Run GDB Tests on ${{ matrix.images }}
run: | run: |
docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g gdb docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g gdb
- name: Run DBG Tests on GDB on ${{ matrix.images }}
run: |
docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g dbg
- name: Run DBG Tests on LLDB on ${{ matrix.images }} - name: Run DBG Tests on GDB on ${{ matrix.images }}
run: | run: |
docker compose run ${{ matrix.images }} ./tests.sh -d lldb -g dbg docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g dbg
- name: Run DBG Tests on LLDB on ${{ matrix.images }}
run: |
docker compose run ${{ matrix.images }} ./tests.sh -d lldb -g dbg
docker_aarch64: docker_aarch64:
strategy: strategy:
@ -50,26 +50,26 @@ jobs:
runs-on: ubuntu-24.04-arm runs-on: ubuntu-24.04-arm
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for docker images - name: Cache for docker images
uses: jpribyl/action-docker-layer-caching@v0.1.1 uses: jpribyl/action-docker-layer-caching@v0.1.1
# Ignore the failure of a step and avoid terminating the job. # Ignore the failure of a step and avoid terminating the job.
continue-on-error: true continue-on-error: true
with: with:
key: ${{ matrix.images }}-cache-images-aarch64-{hash} key: ${{ matrix.images }}-cache-images-aarch64-{hash}
- name: Docker Build ${{ matrix.images }} - name: Docker Build ${{ matrix.images }}
run: docker compose build ${{ matrix.images }} run: docker compose build ${{ matrix.images }}
- name: Run Cross Tests on GDB on ${{ matrix.images }} - name: Run Cross Tests on GDB on ${{ matrix.images }}
run: | run: |
docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g cross-arch-user docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g cross-arch-user
- name: Run DBG Tests on GDB on ${{ matrix.images }} - name: Run DBG Tests on GDB on ${{ matrix.images }}
run: | run: |
docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g dbg docker compose run ${{ matrix.images }} ./tests.sh -d gdb -g dbg
- name: Run DBG Tests on LLDB on ${{ matrix.images }} - name: Run DBG Tests on LLDB on ${{ matrix.images }}
run: | run: |
docker compose run ${{ matrix.images }} ./tests.sh -d lldb -g dbg docker compose run ${{ matrix.images }} ./tests.sh -d lldb -g dbg

@ -2,10 +2,10 @@ name: Lint
on: on:
pull_request: pull_request:
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
jobs: jobs:
lint: lint:
@ -16,42 +16,88 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for pip - name: Cache for pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ matrix.os }}-cache-pip key: ${{ matrix.os }}-cache-pip
- name: Install latest uv - name: Install latest uv
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v6
with: with:
version: "latest" version: "latest"
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt install -y shfmt curl sudo apt install -y shfmt curl
uv sync --group lint --group dev uv sync --group lint --group dev
- name: Run linters - name: Run linters
run: | run: |
git diff-index --quiet HEAD -- pwndbg tests git diff-index --quiet HEAD -- pwndbg tests
./lint.sh ./lint.sh
- name: Run mypy # The PR must not contain any mypy errors
uses: tsuyoshicho/action-mypy@v4 - name: Run mypy
with: uses: tsuyoshicho/action-mypy@v4
github_token: ${{ secrets.GITHUB_TOKEN }} with:
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check # Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
# Change reporter level if you need. reporter: github-pr-check
# GitHub Status Check won't become failure with warning. # Change reporter level if you need.
level: error # GitHub Status Check won't become failure with warning.
# Change the current directory to run mypy command. level: error
# mypy command reads setup.cfg or other settings file in this path. # Change the current directory to run mypy command.
execute_command: uv run --group dev --group lint --group tests --extra gdb --extra lldb mypy # mypy command reads setup.cfg or other settings file in this path.
install_types: false execute_command: uv run --group dev --group lint --group tests --all-extras mypy
target: pwndbg pwndbginit tests/host install_types: false
filter_mode: nofilter target: pwndbg pwndbginit tests/host
fail_on_error: true filter_mode: nofilter
fail_on_error: true
# The PR must not contain more mypy --strict errors than the dev branch does
- name: Count strict mypy errors in PR branch
id: mypy_pr
run: |
set +e
uv run --group dev --group lint --group tests --all-extras mypy --strict pwndbg pwndbginit tests/host > mypy_pr.txt 2>&1
echo "exit_code=$?" >> $GITHUB_OUTPUT
ERRORS=$(grep -c "error:" mypy_pr.txt || true)
echo "count=$ERRORS" >> $GITHUB_OUTPUT
echo "PR mypy (--strict) errors: $ERRORS"
continue-on-error: true
- name: Check out dev branch
run: |
git fetch origin dev
git checkout origin/dev
- name: Count strict mypy errors in dev branch
id: mypy_dev
run: |
set +e
uv run --group dev --group lint --group tests --all-extras mypy --strict pwndbg pwndbginit tests/host > mypy_dev.txt 2>&1
echo "exit_code=$?" >> $GITHUB_OUTPUT
ERRORS=$(grep -c "error:" mypy_dev.txt || true)
echo "count=$ERRORS" >> $GITHUB_OUTPUT
echo "Dev mypy (--strict) errors: $ERRORS"
continue-on-error: true
- name: Compare mypy error counts
run: |
PR_ERRORS=${{ steps.mypy_pr.outputs.count }}
DEV_ERRORS=${{ steps.mypy_dev.outputs.count }}
echo "PR errors: $PR_ERRORS"
echo "Dev errors: $DEV_ERRORS"
if [ "$PR_ERRORS" -gt "$DEV_ERRORS" ]; then
echo "This PR introduces more \`mypy --strict\` errors than are present on the dev branch."
echo "You may run \`uv run mypy --strict file/you/modified\` to diagnose where the issue lies."
echo "Ideally, a python type checker (mypy/pyright/ty/pyrefly etc..) should be running in your editor."
exit 1
else
echo "This PR does not introduce any more \`mypy --strict\` errors than there are on the dev branch."
fi

@ -4,16 +4,16 @@ on:
branches: branches:
- dev - dev
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
pull_request: pull_request:
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
jobs: jobs:
check_release_build-gdb: check_release_build-gdb:
@ -22,34 +22,34 @@ jobs:
matrix: matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os: [ os: [
ubuntu-latest, # x86_64-linux ubuntu-latest, # x86_64-linux
ubuntu-24.04-arm, # aarch64-linux ubuntu-24.04-arm, # aarch64-linux
macos-15-intel, # x86_64-darwin macos-15-intel, # x86_64-darwin
macos-15, # aarch64-darwin macos-15, # aarch64-darwin
] ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30 - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: configure cache - name: configure cache
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15 uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with: with:
name: pwndbg name: pwndbg
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build pwndbg - name: build pwndbg
run: nix build '.#pwndbg' --accept-flake-config -o result run: nix build '.#pwndbg' --accept-flake-config -o result
- name: simple run pwndbg - name: simple run pwndbg
run: TERM=xterm-256color ./result/bin/pwndbg <<< 'exit' run: TERM=xterm-256color ./result/bin/pwndbg <<< 'exit'
- name: build develop environment - name: build develop environment
run: nix develop --accept-flake-config run: nix develop --accept-flake-config
check_release_build-lldb: check_release_build-lldb:
strategy: strategy:
@ -57,58 +57,58 @@ jobs:
matrix: matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os: [ os: [
ubuntu-latest, # x86_64-linux ubuntu-latest, # x86_64-linux
ubuntu-24.04-arm, # aarch64-linux ubuntu-24.04-arm, # aarch64-linux
macos-15-intel, # x86_64-darwin macos-15-intel, # x86_64-darwin
macos-15, # aarch64-darwin macos-15, # aarch64-darwin
] ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30 - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: configure cache - name: configure cache
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15 uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with: with:
name: pwndbg name: pwndbg
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build pwndbg - name: build pwndbg
run: nix build '.#pwndbg-lldb' --accept-flake-config -o result run: nix build '.#pwndbg-lldb' --accept-flake-config -o result
- name: simple run pwndbg - name: simple run pwndbg
run: TERM=xterm-256color ./result/bin/pwndbg-lldb <<< 'exit' run: TERM=xterm-256color ./result/bin/pwndbg-lldb <<< 'exit'
- name: build develop environment - name: build develop environment
run: nix develop --accept-flake-config run: nix develop --accept-flake-config
lock_flake: lock_flake:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30 - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: check flake.lock - name: check flake.lock
run: nix flake lock --no-update-lock-file run: nix flake lock --no-update-lock-file
lock_uv: lock_uv:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30 - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: install uv - name: install uv
run: nix profile install --inputs-from . nixpkgs#uv run: nix profile install --inputs-from . nixpkgs#uv
- name: check uv.lock - name: check uv.lock
run: uv lock --locked run: uv lock --locked

@ -4,16 +4,16 @@ on:
branches: branches:
- dev - dev
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
pull_request: pull_request:
paths: paths:
- '**' - "**"
- '!mkdocs.yml' - "!mkdocs.yml"
- '!docs/**' - "!docs/**"
- '!*.md' - "!*.md"
jobs: jobs:
tests-using-nix: tests-using-nix:
strategy: strategy:
@ -26,66 +26,66 @@ jobs:
env: env:
TMPDIR: /tmp TMPDIR: /tmp
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30 - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # @v30
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: Install dependencies - name: Install dependencies
run: | run: |
./setup-dev.sh --install-only ./setup-dev.sh --install-only
- name: install uv - name: install uv
run: nix profile install --inputs-from . nixpkgs#uv run: nix profile install --inputs-from . nixpkgs#uv
- name: Build pwndbg - name: Build pwndbg
run: | run: |
nix build '.#pwndbg-dev' --accept-flake-config -o result nix build '.#pwndbg-dev' --accept-flake-config -o result
# We set `kernel.yama.ptrace_scope=0` for `attachp` command tests # We set `kernel.yama.ptrace_scope=0` for `attachp` command tests
- name: Setup - name: Setup
run: | run: |
sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.yama.ptrace_scope=0
- name: Run tests - name: Run tests
if: matrix.type == 'unit-tests' if: matrix.type == 'unit-tests'
run: | run: |
./unit-tests.sh ./unit-tests.sh
- name: Run GDB Tests - name: Run GDB Tests
if: matrix.type == 'tests' if: matrix.type == 'tests'
run: | run: |
./tests.sh --nix -d gdb -g gdb ./tests.sh --nix -d gdb -g gdb
- name: Run DBG Tests on GDB - name: Run DBG Tests on GDB
if: matrix.type == 'tests' if: matrix.type == 'tests'
run: | run: |
./tests.sh --nix -d gdb -g dbg ./tests.sh --nix -d gdb -g dbg
- name: Run cross-arch tests - name: Run cross-arch tests
if: matrix.type == 'qemu-user-tests' if: matrix.type == 'qemu-user-tests'
run: | run: |
./tests.sh --nix -d gdb -g cross-arch-user ./tests.sh --nix -d gdb -g cross-arch-user
- name: Set up cache for QEMU images - name: Set up cache for QEMU images
if: matrix.type == 'qemu-system-tests' if: matrix.type == 'qemu-system-tests'
id: qemu-cache id: qemu-cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ./tests/library/qemu-system/kimages path: ./tests/library/qemu-system/kimages
key: ${{ matrix.os }}-cache-qemu-images key: ${{ matrix.os }}-cache-qemu-images
- name: Download QEMU images - name: Download QEMU images
if: matrix.type == 'qemu-system-tests' if: matrix.type == 'qemu-system-tests'
run: | run: |
# Would happen in the next step as well, but this way # Would happen in the next step as well, but this way
# it looks nicer in the CI. # it looks nicer in the CI.
./tests/library/qemu_system/download-kernel-images.sh ./tests/library/qemu_system/download-kernel-images.sh
- name: Run kernel tests - name: Run kernel tests
if: matrix.type == 'qemu-system-tests' if: matrix.type == 'qemu-system-tests'
run: | run: |
./kernel-tests.sh --nix ./kernel-tests.sh --nix
tests: tests:
strategy: strategy:
@ -95,95 +95,95 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for pip - name: Cache for pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ matrix.os }}-cache-pip key: ${{ matrix.os }}-cache-pip
- name: Setup pwndbg - name: Setup pwndbg
run: | run: |
./setup.sh ./setup.sh
./setup-dev.sh ./setup-dev.sh
- name: Python version info - name: Python version info
run: | run: |
echo 'GDB py:' echo 'GDB py:'
gdb --batch --quiet --nx --nh --ex 'py import sys; print(sys.version)' gdb --batch --quiet --nx --nh --ex 'py import sys; print(sys.version)'
echo 'Installed py:' echo 'Installed py:'
./.venv/bin/python -V ./.venv/bin/python -V
echo 'Installed packages:' echo 'Installed packages:'
./.venv/bin/pip freeze ./.venv/bin/pip freeze
# We set `kernel.yama.ptrace_scope=0` for `attachp` command tests # We set `kernel.yama.ptrace_scope=0` for `attachp` command tests
- name: Run GDB Tests - name: Run GDB Tests
run: | run: |
sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.yama.ptrace_scope=0
./tests.sh -d gdb -g gdb ./tests.sh -d gdb -g gdb
- name: Run DBG Tests on GDB - name: Run DBG Tests on GDB
run: | run: |
sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.yama.ptrace_scope=0
./tests.sh -d gdb -g dbg ./tests.sh -d gdb -g dbg
- name: Run DBG Tests on LLDB - name: Run DBG Tests on LLDB
if: matrix.os != 'ubuntu-22.04' if: matrix.os != 'ubuntu-22.04'
run: | run: |
sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.yama.ptrace_scope=0
./tests.sh -d lldb -g dbg ./tests.sh -d lldb -g dbg
qemu-user-tests: qemu-user-tests:
runs-on: [ubuntu-24.04] runs-on: [ubuntu-24.04]
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for pip - name: Cache for pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ matrix.os }}-cache-pip key: ${{ matrix.os }}-cache-pip
- name: Setup pwndbg - name: Setup pwndbg
run: | run: |
./setup.sh ./setup.sh
./setup-dev.sh ./setup-dev.sh
- name: Run cross-architecture tests - name: Run cross-architecture tests
run: | run: |
./tests.sh -g cross-arch-user -d gdb ./tests.sh -g cross-arch-user -d gdb
qemu-system-tests: qemu-system-tests:
runs-on: [ubuntu-22.04] runs-on: [ubuntu-22.04]
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Cache for pip - name: Cache for pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ matrix.os }}-cache-pip key: ${{ matrix.os }}-cache-pip
- name: Setup pwndbg - name: Setup pwndbg
run: | run: |
./setup.sh ./setup.sh
./setup-dev.sh ./setup-dev.sh
- name: Set up cache for QEMU images - name: Set up cache for QEMU images
id: qemu-cache id: qemu-cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ./tests/library/qemu-system/kimages path: ./tests/library/qemu-system/kimages
key: ${{ matrix.os }}-cache-qemu-images key: ${{ matrix.os }}-cache-qemu-images
- name: Download images - name: Download images
run: | run: |
./tests/library/qemu_system/download-kernel-images.sh ./tests/library/qemu_system/download-kernel-images.sh
# We set `kernel.yama.ptrace_scope=0` for `gdb-pt-dump` # We set `kernel.yama.ptrace_scope=0` for `gdb-pt-dump`
- name: Run kernel tests - name: Run kernel tests
run: | run: |
sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.yama.ptrace_scope=0
./kernel-tests.sh ./kernel-tests.sh

Loading…
Cancel
Save