Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
dc2f4cb
add initial uv/pyproject config
simbuerg Jul 27, 2025
50ebdb5
add missing requirement to six
simbuerg Jul 27, 2025
56eba3f
add console scripts
simbuerg Jul 27, 2025
ac701cc
add missing setup.py entries
simbuerg Jul 27, 2025
2f66d0b
fix: convert to list
simbuerg Jul 27, 2025
2c76517
fix: remove invalid url parameter
simbuerg Jul 27, 2025
3d23710
fix: remove license override, provide license-files
simbuerg Jul 27, 2025
e6f078a
add dev dependencies
simbuerg Jul 27, 2025
5067ead
format updates
simbuerg Jul 27, 2025
dd47d73
update github actions
simbuerg Jul 27, 2025
d2f6330
disable local scheme
simbuerg Jul 27, 2025
51ffa31
fix: sphinx-build
simbuerg Jul 27, 2025
73ec115
fix: add missing python-version
simbuerg Jul 27, 2025
847ea63
fix: run inside venv when generating docs
simbuerg Jul 27, 2025
9f0c513
fix: ignore _version.py
simbuerg Jul 27, 2025
b19eb50
fix: avoid override of version in conf.py
simbuerg Jul 27, 2025
29f8f14
chore: convert pre-commit to using ruff
simbuerg Jul 27, 2025
ca2adfc
chore: reformat using ruff
simbuerg Jul 27, 2025
711e932
fix: improve python version handling in ci workflow
simbuerg Jul 27, 2025
4139c45
add missing uv install to integration workflow
simbuerg Sep 28, 2025
edc8f17
Merge branch 'master' into feature/uv
simbuerg Sep 28, 2025
03edc9d
fix(ci): make uv venv cooperate with coverage
simbuerg Sep 28, 2025
2d82e38
fix(ci): update/replace python handling using uv
simbuerg Sep 28, 2025
c8b5518
fix (coverage): do not try to measure local venv directories
simbuerg Nov 20, 2025
cef024c
Merge branch 'master' into feature/uv
simbuerg Nov 20, 2025
2cb1117
fix (coverage): point to pyscript directly
simbuerg Nov 20, 2025
893159d
ci: expand python test matrix
simbuerg Nov 20, 2025
69f4384
chore: set minimum python version to 3.10
simbuerg Nov 20, 2025
081a470
chore: resolve dependency version for each python release
simbuerg Nov 20, 2025
cb9e19c
fix (ci): add libgit2-dev
simbuerg Nov 20, 2025
767b473
ci: do not fail-fast
simbuerg Nov 20, 2025
8691ebd
feat (python): bump minimum python version to 3.11
simbuerg Nov 20, 2025
7ef5fa2
chore (pygit2): bump minimum version to 1.19
simbuerg Nov 20, 2025
168ac58
fix: adjust workflows
simbuerg Jul 14, 2026
1b9894c
chore: reformat / lint
simbuerg Jul 24, 2026
81cf5f4
chore: remove .travis.yml
simbuerg Jul 24, 2026
7de203a
fix: source name collision breaks ci builds
simbuerg Jul 26, 2026
243a949
fix: missing arguments + type errors
simbuerg Jul 26, 2026
c23b316
fix: add empty default args for tmp & builddir
simbuerg Jul 26, 2026
c4e14e7
Merge branch 'master' into feature/uv
simbuerg Jul 26, 2026
3f7e84d
ci: add triggers for integration workflow
simbuerg Jul 26, 2026
a48ce21
ci: test reusable workflow
simbuerg Jul 26, 2026
c12fa26
ci: add missing workflow
simbuerg Jul 26, 2026
2e7eee4
ci: typo
simbuerg Jul 26, 2026
b2af21d
ci: focus on integration + unittests
simbuerg Jul 26, 2026
70e99be
ci: remove previous runner workflow
simbuerg Jul 26, 2026
2f72fbe
ci: remove dependency
simbuerg Jul 26, 2026
057c084
ci: make sure to checkout first
simbuerg Jul 26, 2026
17aad66
ci: fix missing shell
simbuerg Jul 26, 2026
c0858dd
ci: add mypy + ruff as dev deps
simbuerg Jul 26, 2026
9e97d9a
ci: split workflows into components
simbuerg Jul 26, 2026
75ac358
ci: add missing uv setup
simbuerg Jul 26, 2026
c39e4fc
ci: make unittests + integration a dependency of coverage
simbuerg Jul 26, 2026
6d16d37
ci: use v9 of setup-uv action
simbuerg Jul 26, 2026
dbc0932
ci: use v9 of setup-uv action
simbuerg Jul 26, 2026
6b25c84
ci: switch reviewdog back to pr-check
simbuerg Jul 26, 2026
e4932af
ci: only create docs, when testing completes
simbuerg Jul 26, 2026
cee9f14
ci: enable hidden files to find our coverage data
simbuerg Jul 26, 2026
58067aa
ci: enable matrix options for unittests & integration again
simbuerg Jul 27, 2026
eac6d78
fix: remove duplicate
simbuerg Jul 27, 2026
bf68954
refactor: manual run of 'uv ruff check --fix'
simbuerg Jul 27, 2026
b008b9d
refactor: sqlalchemy.ext.declarative -> sqlalchemy.orm.declarative_base
simbuerg Jul 27, 2026
4844c7a
ci: fix reviewdog for mypy runner
simbuerg Jul 27, 2026
839135c
ci: fix reviewdog ruff runner
simbuerg Jul 27, 2026
3760361
ci: encapsulate reviewdog in uv
simbuerg Jul 27, 2026
0f46c4c
ci: split back into two
simbuerg Jul 27, 2026
82bd09b
ci: use concise output format for reviewdog
simbuerg Jul 27, 2026
5f72c18
ci: add dedicated ruff-based code quality workflow
simbuerg Jul 27, 2026
465f24e
ci: fix syntax
simbuerg Jul 27, 2026
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
5 changes: 3 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[run]
include = */benchbuild/*
omit =
./venv/*
*/bin/benchbuild*
*/benchbuild/lib/*
*/benchbuild/bin/*
.venv/*
branch = True
parallel = True

[paths]
data_file = ${BB_COVERAGE_PATH-default .}/.coverage
source =
benchbuild/
*/site-packages/benchbuild/
Expand Down
40 changes: 40 additions & 0 deletions .github/actions/setup-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Setup BenchBuild Runner Environment"
description: "Install APT system depedcies"
inputs:
python-version:
description: "The python version to use"
type: string
required: false
default: "3.14"
runs:
using: "composite"
steps:
- name: Cache APT Packages
uses: actions/cache@v6
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('**/packages.list') }}
restore-keys: |
${{ runner.os }}-apt-

- name: Install APT Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y \
podman \
clang \
time \
unionfs-fuse \
libfuse-dev \
libgit2-dev

- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
python-version: ${{ inputs.python-version }}

- name: Install the project
shell: bash
run: |
uv sync --locked --all-extras --dev
204 changes: 36 additions & 168 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,173 +1,41 @@
name: ci
name: Unittests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_call:
inputs:
python-version:
description: "The python version to use"
type: string
required: false
default: "3.14"

jobs:
unittests:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies for CI
run: |
sudo apt-get install time unionfs-fuse libfuse-dev clang

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install .
pip install -r requirements.txt
pip install -r test-requirements.txt

- name: Run unittests
env:
# Avoid 50 char hard-limit of podman. These are enforced because of
# a kernel limit of 128-chars for socket paths.
BB_CONTAINER_RUNROOT: "/tmp"
BB_CONTAINER_ROOT: "/tmp"
run: |
git config --global protocol.file.allow always

pytest --cov-config=./.coveragerc --cov=benchbuild --ignore=tests/integration benchbuild tests
pytest --cov-config=./.coveragerc --cov=benchbuild tests/integration

- uses: actions/upload-artifact@master
with:
name: coverage-unittests-${{ matrix.python-version }}
path: ./.coverage


integration:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
db_support: [true, false]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies for CI
run: |
sudo apt-get install time unionfs-fuse libfuse-dev clang slurm-client

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install .
pip install -r requirements.txt
pip install -r test-requirements.txt

- name: Run integration tests
env:
BB_DB_ENABLED: ${{ matrix.db_support }}
BB_DB_CONNECT_STRING: "sqlite://"
BB_COVERAGE_COLLECT: true
BB_COVERAGE_PATH: ${{ github.workspace }}
BB_COVERAGE_CONFIG: ${{ github.workspace }}/.coveragerc
BB_CONTAINER_ROOT: ${{ runner.temp }}
BB_CONTAINER_RUNROOT: ${{ runner.temp }}
BB_VERBOSITY: 5
run: |
coverage run -p `which benchbuild` bootstrap -s
coverage run -p `which benchbuild` config view
coverage run -p `which benchbuild` experiment view
coverage run -p `which benchbuild` project view
coverage run -p `which benchbuild` run --full test
coverage run -p `which benchbuild` slurm -E empty test
coverage run -p `which benchbuild` slurm -E raw bzip2/benchbuild -- container --runroot /foo/bar
coverage run -p `which benchbuild` run -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container run -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container bases --export -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container bases --import -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container rmi --with-projects -E raw bzip2/benchbuild
coverage combine
coverage report -m

- uses: actions/upload-artifact@master
with:
name: coverage-integration-${{ matrix.python-version }}
path: ./.coverage

upload_coverage:
needs: [unittests, integration]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: actions/download-artifact@master
with:
name: coverage-unittests-${{ matrix.python-version }}
path: ./.coverage.unittests

- uses: actions/download-artifact@master
with:
name: coverage-integration-${{ matrix.python-version }}
path: ./.coverage.integration

- run: |
ls -lah .
python -m pip install --upgrade pip wheel
pip install coverage
coverage combine -a ./.coverage.integration/.coverage ./.coverage.unittests/.coverage
coverage xml

- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

docs:
needs: [unittests, integration]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup a git user
run: |
git config user.name github-actions
git config user.email github-actions@github.com

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r docs/requirements.txt
- name: Checkout
uses: actions/checkout@v7

- uses: ./.github/actions/setup-runner
with:
python-version: "${{ inputs.python-version }}"

- name: Run unittests
env:
# Avoid 50 char hard-limit of podman. These are enforced because of
# a kernel limit of 128-chars for socket paths.
BB_CONTAINER_RUNROOT: "/tmp"
BB_CONTAINER_ROOT: "/tmp"
run: |
git config --global protocol.file.allow always

uv run pytest --cov-config=./.coveragerc --cov=benchbuild --ignore=tests/integration benchbuild tests
uv run pytest --cov-config=./.coveragerc --cov=benchbuild tests/integration

find . -type f -iname '*.coverage*'

- uses: actions/upload-artifact@v7
with:
name: coverage-unittests-${{ inputs.python-version }}
path: ./.coverage
# Security: Careful with adding wildcard patterns above!
include-hidden-files: true
45 changes: 45 additions & 0 deletions .github/workflows/coverage-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Combine coverage data.
on:
workflow_call:
inputs:
python-version:
description: "The python version to use"
type: string
required: false
default: "3.14"

jobs:
upload_coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- uses: actions/download-artifact@master
with:
name: coverage-unittests-${{ inputs.python-version }}
path: ./.coverage.unittests

- uses: actions/download-artifact@master
with:
name: coverage-integration-${{ inputs.python-version }}
path: ./.coverage.integration

- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
python-version: ${{ inputs.python-version }}
enable-cache: true

- run: |
uv sync --locked --all-extras --dev
uv pip install coverage
uv run coverage combine -a ./.coverage.integration/.coverage ./.coverage.unittests/.coverage
uv run coverage xml

- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
overwrite: true
file: ./coverage.xml
55 changes: 10 additions & 45 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: sphinx
on: [push, pull_request]

name: "Generate sphinx documentation"
description: "Generate sphinx documentation and push to gh-pages"
on:
workflow_call:
env:
DEFAULT_BRANCH: "master"
#SPHINXOPTS: "-W --keep-going -T"
Expand All @@ -11,59 +12,23 @@ jobs:
name: Build and gh-pages
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
fetch-depth: 0
lfs: true

# https://github.com/marketplace/actions/setup-python
# ^-- This gives info on matrix testing.
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

# https://docs.github.com/en/actions/guides/building-and-testing-python#caching-dependencies
# ^-- How to set up caching for pip on Ubuntu
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9

# https://docs.github.com/en/actions/guides/building-and-testing-python#installing-dependencies
# ^-- This gives info on installing dependencies with pip
- name: Install dependencies
- name: Install the project
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install .

- name: Debugging information
run: |
echo "github.ref:" ${{github.ref}}
echo "github.event_name:" ${{github.event_name}}
echo "github.head_ref:" ${{github.head_ref}}
echo "github.base_ref:" ${{github.base_ref}}
set -x
git rev-parse --abbrev-ref HEAD
git branch
git branch -a
git remote -v
python -V
pip list --not-required
pip list
uv sync --locked --all-extras --dev --group docs

# Build
- uses: ammaraskar/sphinx-problem-matcher@master
- name: Build Sphinx docs
run: |
make -Cdocs dirhtml
uv run make -Cdocs dirhtml
# This fixes broken copy button icons, as explained in
# https://github.com/coderefinery/sphinx-lesson/issues/50
# https://github.com/executablebooks/sphinx-copybutton/issues/110
Expand Down
Loading
Loading