Updated tests with build scripts in docker containers
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Anne de Jong 2023-07-24 17:24:12 +02:00
parent 89b303497b
commit a29f72a592
3 changed files with 29 additions and 5 deletions

View File

@ -42,6 +42,11 @@ source_path = "."
build_args = ["-j"] build_args = ["-j"]
install_components = ["python_modules"] install_components = ["python_modules"]
[tool.py-build-cmake.editable]
# This might not work properly on Windows. Comment this out when testing on
# Windows.
mode = "symlink"
[tool.commitizen] [tool.commitizen]
name = "cz_conventional_commits" name = "cz_conventional_commits"
tag_format = "v$version" tag_format = "v$version"

View File

@ -0,0 +1,17 @@
#/bin/bash
# Build LASP on Arch Linux, assuming we start in a clean docker container.
# After that, test stuff.
# Assumptions
# - CWD is root of lasp repository
# - Nothing is installed
# Stop on first error
set -e
pacman -Syu --noconfirm base-devel git ccache openblas fftw pulseaudio python-build libusb
git submodule update --init --recursive
pyproject-build
python -m venv .venv
source .venv/bin/activate
pip install pytest
pip install dist/lasp-*linux_x86_64.whl
pytest

View File

@ -1,9 +1,11 @@
#!/bin/sh #!/bin/sh
# #
apt update apt update
apt install -y python3-venv apt install -y python3-venv libopenblas-dev python3-pip libusb-1.0-0-dev libpulse-dev python3-build
git submodule update --init --recursive git submodule update --init --recursive
pyproject-build
cmake . python -m venv .venv
# More than two processes creates too much load source .venv/bin/activate
make -j2 pip install pytest
pip install dist/lasp-*linux_x86_64.whl
pytest