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:
parent
b17502d658
commit
e57375f1e2
|
@ -13,7 +13,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
unit-tests:
|
unit-tests:
|
||||||
name: unit tests
|
name: unit tests
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -22,13 +22,13 @@ jobs:
|
||||||
#run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
#run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: setup python
|
- name: install uv and dependencies
|
||||||
run: |
|
run: |
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
uv venv
|
uv venv
|
||||||
# TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed
|
# TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed
|
||||||
uv pip install -e .[testing,docs] setuptools
|
uv pip install -e .[testing,docs] setuptools
|
||||||
- run: uv run scons -j$(nproc)
|
- run: uv run scons -j8
|
||||||
- run: uv run pytest .
|
- run: uv run pytest .
|
||||||
|
|
||||||
static-analysis:
|
static-analysis:
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sysconfig
|
import sysconfig
|
||||||
|
import platform
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||||
|
if platform.system() == "Darwin":
|
||||||
|
arch = "Darwin"
|
||||||
|
|
||||||
python_path = sysconfig.get_paths()['include']
|
python_path = sysconfig.get_paths()['include']
|
||||||
cpppath = [
|
cpppath = [
|
||||||
|
@ -73,4 +76,4 @@ envCython["LIBS"] = python_libs
|
||||||
|
|
||||||
Export('envCython')
|
Export('envCython')
|
||||||
|
|
||||||
SConscript(['opendbc/can/SConscript'])
|
SConscript(['opendbc/can/SConscript'])
|
|
@ -5,7 +5,7 @@ description = "CAN bus databases and tools"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
authors = [{ name = "Vehicle Researcher", email = "user@comma.ai" }]
|
authors = [{ name = "Vehicle Researcher", email = "user@comma.ai" }]
|
||||||
readme = "README.md"
|
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" }
|
urls = { "homepage" = "https://github.com/commaai/opendbc" }
|
||||||
|
|
||||||
|
|
4
test.sh
4
test.sh
|
@ -5,11 +5,9 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
# ensure we're up to date
|
# ensure we're up to date
|
||||||
uv venv --allow-existing
|
uv sync --all-extras
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
|
|
||||||
uv pip install -e .[testing,docs]
|
|
||||||
|
|
||||||
uv run scons -j8
|
uv run scons -j8
|
||||||
|
|
||||||
uv run pre-commit run --all-files
|
uv run pre-commit run --all-files
|
||||||
|
|
Loading…
Reference in New Issue