diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b23c5db..5f263962 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ on: jobs: unit-tests: name: unit tests - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.os }} timeout-minutes: 1 strategy: fail-fast: false @@ -22,13 +22,13 @@ jobs: #run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] steps: - uses: actions/checkout@v4 - - name: setup python + - name: install uv and dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh uv venv # TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed uv pip install -e .[testing,docs] setuptools - - run: uv run scons -j$(nproc) + - run: uv run scons -j8 - run: uv run pytest . static-analysis: diff --git a/SConstruct b/SConstruct index 932ff26e..1434ca38 100644 --- a/SConstruct +++ b/SConstruct @@ -1,9 +1,12 @@ import os import subprocess import sysconfig +import platform import numpy as np arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() +if platform.system() == "Darwin": + arch = "Darwin" python_path = sysconfig.get_paths()['include'] cpppath = [ @@ -73,4 +76,4 @@ envCython["LIBS"] = python_libs Export('envCython') -SConscript(['opendbc/can/SConscript']) +SConscript(['opendbc/can/SConscript']) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0ffe4521..43c700c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "CAN bus databases and tools" license = { file = "LICENSE" } authors = [{ name = "Vehicle Researcher", email = "user@comma.ai" }] readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.9,<3.13" # pycapnp doesn't work with 3.13 urls = { "homepage" = "https://github.com/commaai/opendbc" } diff --git a/test.sh b/test.sh index a574da2f..6b6265b1 100755 --- a/test.sh +++ b/test.sh @@ -5,11 +5,9 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd $DIR # ensure we're up to date -uv venv --allow-existing +uv sync --all-extras source .venv/bin/activate -uv pip install -e .[testing,docs] - uv run scons -j8 uv run pre-commit run --all-files