2023-09-17 17:52:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Build LASP on Ubuntu Linux, assuming we start in a clean docker container.
|
2023-07-24 16:01:51 +00:00
|
|
|
# After that, test stuff.
|
|
|
|
# Assumptions
|
|
|
|
# - CWD is root of lasp repository
|
|
|
|
# - Nothing is installed
|
|
|
|
|
|
|
|
# Stop on first error
|
2023-07-24 16:01:02 +00:00
|
|
|
set -e
|
2023-07-24 16:01:51 +00:00
|
|
|
# Update cache
|
2023-10-05 19:39:41 +00:00
|
|
|
# apt update
|
|
|
|
# Install requirements, this is done inside the Docker container to safe some
|
|
|
|
# work!
|
|
|
|
# apt install -y git python3 python3-virtualenv python3-venv libopenblas-dev python3-pip libfftw3-dev libusb-1.0-0-dev libpulse-dev python3-build
|
|
|
|
#
|
|
|
|
# Build in venv
|
2023-07-24 16:01:02 +00:00
|
|
|
python3 -m venv .venv
|
2023-10-05 19:39:41 +00:00
|
|
|
# Activate venv
|
2023-07-24 15:24:12 +00:00
|
|
|
source .venv/bin/activate
|
2023-10-05 19:39:41 +00:00
|
|
|
# Build in venv
|
2023-09-17 15:14:55 +00:00
|
|
|
pip install build pytest
|
|
|
|
python3 -m build
|
2023-07-24 15:24:12 +00:00
|
|
|
pip install dist/lasp-*linux_x86_64.whl
|
2023-07-24 16:01:51 +00:00
|
|
|
# Test
|
2023-07-24 15:24:12 +00:00
|
|
|
pytest
|