diff --git a/.github/scripts/run-memblock-tests.sh b/.github/scripts/run-memblock-tests.sh new file mode 100755 index 0000000000000..2542e10a70c33 --- /dev/null +++ b/.github/scripts/run-memblock-tests.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euo pipefail + +source "$(dirname "$0")/common.sh" + +test_dir=$linux_dir/tools/testing/memblock + +echo "Building memblock tests..." +make -C $test_dir >$log 2>&1 || fail "build of memblock tests failed" + +echo "Running memblock tests..." +$test_dir/main -v >$log 2>&1 || fail "memblock tests failed" + +# memblock tests use assert() which will abort on failure +# If we reach here, all tests passed +echo "✓ memblock tests passed" +exit 0 diff --git a/.github/workflows/mm-tests.yml b/.github/workflows/mm-tests.yml new file mode 100644 index 0000000000000..679e6a1abaa24 --- /dev/null +++ b/.github/workflows/mm-tests.yml @@ -0,0 +1,57 @@ +name: mm-ci + +on: + pull_request: + push: + branches: + - mm-new + - mm-unstable + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + host-tests: + strategy: + fail-fast: false + matrix: + include: + - runner: ubuntu-24.04 + arch: x86_64 + # - runner: ubuntu-24.04-arm + # arch: arm64 + runs-on: ${{ matrix.runner }} + name: Host tests (${{ matrix.arch }}) + + steps: + - name: checkout repository + uses: actions/checkout@v6 + + - name: Install dependencies + run: | + sudo apt-get -q update + sudo apt-get -qy install build-essential liburcu-dev + + - name: Run memblock tests + run: bash .github/scripts/run-memblock-tests.sh + + - name: Run VMA tests + if: always() + run: bash .github/scripts/run-vma-tests.sh + + - name: Run data structure tests + if: always() + run: bash .github/scripts/run-datastructure-tests.sh + + vm-tests: + runs-on: self-hosted + name: VM tests + + steps: + - name: checkout repository + uses: actions/checkout@v6 + + - name: Run VM tests + run: bash .github/scripts/run-vm-tests.sh