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-07-14 08:12:42 +00:00
|
|
|
apt update
|
2023-07-24 16:01:51 +00:00
|
|
|
# Install requirements
|
2023-09-17 15:34:21 +00:00
|
|
|
apt install -y git python3-virtualenv python3-venv libopenblas-dev python3-pip libfftw3-dev libusb-1.0-0-dev libpulse-dev python3-build
|
2023-07-24 16:01:51 +00:00
|
|
|
# Build
|
2023-07-14 08:12:42 +00:00
|
|
|
git submodule update --init --recursive
|
2023-07-24 16:01:02 +00:00
|
|
|
python3 -m venv .venv
|
2023-07-24 15:24:12 +00:00
|
|
|
source .venv/bin/activate
|
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
|