CI: fix macOS test running (#1516)

* CI: fixes MacOS test running

* CI: adds coreutils for nproc

* CI: fixes based on PR

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
Louis Velez 2024-11-21 17:16:17 -05:00 committed by GitHub
parent b17502d658
commit e57375f1e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 8 deletions

View File

@ -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:

View File

@ -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'])

View File

@ -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" }

View File

@ -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