Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Jul 12, 2024
1 parent be79488 commit df54d62
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Installing build dependencies
run: ./install_dependencies.sh
- name: Installing msgq
run: SCONS_EXTRAS=1 pip3 install --break-system-packages .[dev]
- name: python tests
- name: Building msgq
run: |
export BUILD_TESTS=1
scripts/install_dependencies.sh
pip3 install --break-system-packages .[dev]
- name: Python tests
run: ${{ matrix.backend }}=1 pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append
- name: C++ tests
run: |
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ services.h
libcereal_shared.*
.mypy_cache/
msgq.egg-info
build
build/
dist/
catch2/
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
exclude msgq/**/*.o
recursive-exclude msgq/tests *
recursive-exclude msgq/visionipc/tests *
include SConscript
include SConstruct
recursive-include site_scons *
9 changes: 9 additions & 0 deletions scripts/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR

./install_dependencies.sh
cd ..
python3 -m build
14 changes: 8 additions & 6 deletions install_dependencies.sh → scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

cd $DIR
cd $DIR/../

SUDO=""

Expand Down Expand Up @@ -49,8 +49,10 @@ $SUDO apt-get install -y --no-install-recommends \
xz-utils \
zlib1g-dev

git clone -b v2.x --depth 1 https://github.com/catchorg/Catch2.git
cd Catch2
mv single_include/* ../
cd ..
rm -rf Catch2
if [[ -n "$BUILD_TESTS" ]]; then
git clone -b v2.x --depth 1 https://github.com/catchorg/Catch2.git
cd Catch2
mv single_include/* ../
cd ..
rm -rf Catch2
fi
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def finalize_options(self) -> None:
pass

def run(self) -> None:
scons_flags = '--minimal' if 'SCONS_EXTRAS' not in os.environ else ''
scons_flags = '' if 'BUILD_TESTS' in os.environ else '--minimal'
subprocess.run([f"scons {scons_flags} -j$(nproc)"], shell=True).check_returncode()

class CustomBuild(build):
Expand Down

0 comments on commit df54d62

Please sign in to comment.