Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,29 @@ jobs:
runs-on: ubuntu-latest
env:
RM_TS_DIR: "/tmp/rmlint-unit-testdir"
scons_ARGS: 'VERBOSE=1 DEBUG=1 O=release'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: "Prepare build environment"
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
scons python3-sphinx gettext python3-setuptools \
libblkid-dev libelf-dev libglib2.0-dev libjson-glib-dev \
clang python3-pip python3-cffi python3-dev libffi-dev
pip3 install -r tests/requirements.txt
pip3 install -r docs/requirements.txt
scons gettext python3-setuptools libblkid-dev \
libelf-dev libglib2.0-dev libjson-glib-dev \
python3-pip python3-cffi python3-dev libffi-dev \
py-cpuinfo
pip3 install -r tests/requirements.txt -r docs/requirements.txt

- name: "Build"
# Todo: eventually run tests with valgrind (RM_TS_USE_VALGRIND)
# Todo enable slow tests in pytest
run: |
scons config
scons VERBOSE=1 DEBUG=1 O=release
scons config $scons_ARGS
scons $scons_ARGS

- name: "Check need for testing"
# TODO also include skipping build but allow docs to be processed
# TODO: also include skipping build but allow docs to be processed
run: |
if git diff --exit-code --name-only origin/$GITHUB_BASE_REF...$GITHUB_SHA ':!.gitignore' ':!docs' ':!*.md' ':!*.txt' ':!*.rst'; then
echo "RUN_TEST=false" >> "$GITHUB_ENV"
Expand All @@ -47,7 +46,6 @@ jobs:
fi

- name: "Prepare test environment"
# TODO Ignore linter warning. See https://github.com/github/vscode-github-actions/issues/222
if: ${{ env.RUN_TEST == 'true' }}
# The test suite is seriously disk-intensive. Given that linux
# instances hosted in GitHub have 16G of RAM available we will
Expand All @@ -59,7 +57,7 @@ jobs:
- name: "Test it"
if: ${{ env.RUN_TEST == 'true' }}
run: |
RM_TS_PRINT_CMD=0 RM_TS_PEDANTIC=0 python -m pytest -s -v
RM_TS_PRINT_CMD=0 RM_TS_PEDANTIC=0 pytest

- name: CoW tests
if: ${{ env.RUN_TEST == 'true' }}
Expand All @@ -84,7 +82,7 @@ jobs:
config.hook.pytest_deselected(items=deselected_items)
items[:] = selected_items
EOF
RM_TS_PRINT_CMD=0 RM_TS_PEDANTIC=0 python -m pytest -s -v
RM_TS_PRINT_CMD=0 RM_TS_PEDANTIC=0 pytest

- name: "Cleanup"
if: ${{ env.RUN_TEST == 'true' }}
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/multi-distro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ jobs:
##########
# Debian #
##########
- {
tag: "debian:bullseye",
env: "DEBIAN_FRONTEND=noninteractive",
installcmd: "apt update && apt install -y --no-install-recommends",
pkgs: "clang gettext libblkid-dev libelf-dev libffi-dev libglib2.0-dev libjson-glib-dev python3-cffi python3-dev python3-pip python3-setuptools python3-sphinx scons",
}
- {
tag: "debian:bookworm",
env: "DEBIAN_FRONTEND=noninteractive",
Expand Down Expand Up @@ -96,12 +90,6 @@ jobs:
##########
# Ubuntu #
##########
- {
tag: "ubuntu:20.04",
env: "DEBIAN_FRONTEND=noninteractive",
installcmd: "apt update && apt install -y --no-install-recommends",
pkgs: "clang gettext libblkid-dev libelf-dev libffi-dev libglib2.0-dev libjson-glib-dev python3-cffi python3-dev python3-pip python3-setuptools python3-sphinx scons",
}
- {
tag: "ubuntu:22.04",
env: "DEBIAN_FRONTEND=noninteractive",
Expand All @@ -121,7 +109,7 @@ jobs:
pkgs: "clang gettext libblkid-dev libelf-dev libffi-dev libglib2.0-dev libjson-glib-dev python3-cffi python3-dev python3-pip python3-setuptools python3-sphinx scons",
}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: "Build on ${{ matrix.build.tag }}"
Expand Down
10 changes: 6 additions & 4 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Build dependencies:
* **scons** (build system)
* **sphinx** (manpage/documentation generation)
* **gettext** (support for localization)
* **py-cpuinfo** (soft build dependency: detect SSE/AVX support)

Here's a list of readily prepared commands for known operating systems:

Expand All @@ -40,7 +41,7 @@ Here's a list of readily prepared commands for known operating systems:

$ sudo dnf install git pkgconf gcc gettext scons glib2-devel json-glib-devel
# Optional dependencies for more features:
$ sudo dnf install libblkid-devel elfutils-libelf-devel
$ sudo dnf install libblkid-devel elfutils-libelf-devel python3-cpuinfo
# Optional dependencies for building documentation:
$ sudo dnf install python3-sphinx
# Optional dependencies for the GUI:
Expand Down Expand Up @@ -73,7 +74,7 @@ Here's a list of readily prepared commands for known operating systems:

$ sudo pacman -S pkgconf git scons glib2 gettext json-glib
# Optional dependencies for more features:
$ sudo pacman -S util-linux-libs libelf
$ sudo pacman -S util-linux-libs libelf python-py-cpuinfo
# Optional dependencies for building documentation:
$ sudo pacman -S python-sphinx python-sphinx-bootstrap-theme
# Optional dependencies for the GUI:
Expand Down Expand Up @@ -103,9 +104,10 @@ Here's a list of readily prepared commands for known operating systems:

# Ubuntu-only:
$ sudo apt install software-properties-common && add-apt-repository universe

$ sudo apt install git scons pkgconf gettext build-essential libjson-glib-1.0-0 libjson-glib-dev
# Optional dependencies for more features:
$ sudo apt install libelf-dev libglib2.0-dev libblkid-dev
$ sudo apt install libelf-dev libglib2.0-dev libblkid-dev py-cpuinfo
# Optional dependencies for building documentation:
$ sudo apt install python3-sphinx python3-sphinx-bootstrap-theme
# Optional dependencies for the GUI:
Expand Down Expand Up @@ -147,7 +149,7 @@ Here's a list of readily prepared commands for known operating systems:

$ doas pkg install git scons-py311 pkgconf glib gettext json-glib
# Optional dependencies for more features:
$ doas pkg install libelf
$ doas pkg install libelf py311-py-cpuinfo
# Optional dependencies for building documentation:
$ doas pkg install py311-sphinx py311-pydata-sphinx-theme gtksourceview4

Expand Down