Test virtualenvs and build envs
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
ddbb842c14
commit
fc681f3b6c
30
.drone.yml
30
.drone.yml
@ -25,16 +25,7 @@ steps:
|
|||||||
image: archlinux_build:latest
|
image: archlinux_build:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
# The following command is not required, we included this in the docker
|
- scripts/test.sh
|
||||||
# image of archlinux_build
|
|
||||||
# - pacman -S --noconfirm openblas python-pytest fftw pulseaudio python-pip python-scipy python-h5py
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
- pip install .
|
|
||||||
- pytest
|
|
||||||
|
|
||||||
# - name: release-arch
|
|
||||||
# commands:
|
|
||||||
# -
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: archlinux_ccache
|
- name: archlinux_ccache
|
||||||
@ -60,27 +51,16 @@ steps:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: ubuntu_ccache
|
- name: ubuntu_ccache
|
||||||
path: /root/.ccache
|
path: /root/.ccache
|
||||||
|
environment:
|
||||||
commands:
|
commands:
|
||||||
# The following commands are not required, we included this in the docker
|
# The following commands are not required, we included this in the docker
|
||||||
# image of ubuntu_build
|
# image of ubuntu_builud
|
||||||
#- apt update
|
- scripts/build_ubuntu.sh
|
||||||
#- apt install -y git cmake python3-pybind11 libopenblas-dev python3-pip python3-scipy libusb-1.0-0-dev libpulse-dev python3-h5py fftw-dev
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- cmake .
|
|
||||||
# More than two makes ascee2 irresponsive for now
|
|
||||||
- make -j2
|
|
||||||
|
|
||||||
- name: ubuntu_test
|
- name: ubuntu_test
|
||||||
image: ubuntu_build:latest
|
image: ubuntu_build:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
# The following commands are not required, we included this in the docker
|
- scripts/test.sh
|
||||||
# image of ubuntu_build
|
|
||||||
#- apt update
|
|
||||||
#- apt install -y python3-pytest fftw pulseaudio python3-pip python3-scipy python3-h5py
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
- pip install .
|
|
||||||
- pytest-3
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: ubuntu_ccache
|
- name: ubuntu_ccache
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
addopts = "--ignore=third_party"
|
addopts = "--ignore=third_party --ignore=examples"
|
||||||
|
0
scripts/build_archlinux.sh
Normal file
0
scripts/build_archlinux.sh
Normal file
9
scripts/build_ubuntu.sh
Normal file
9
scripts/build_ubuntu.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
apt update
|
||||||
|
apt install -y python3-venv
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
cmake .
|
||||||
|
# More than two processes creates too much load
|
||||||
|
make -j2
|
18
scripts/test.sh
Executable file
18
scripts/test.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#/bin/sh
|
||||||
|
# This script is run in the CI/CD system to test the code.
|
||||||
|
python3 -m venv testenv
|
||||||
|
|
||||||
|
# Activate environment
|
||||||
|
. testenv/bin/activate
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
arch_os_line='NAME="Arch Linux"'
|
||||||
|
if [[ $(sed -n "/^${arch_os_line}/p;q" /etc/os-release) == ${arch_os_line} ]]; then
|
||||||
|
# Arch Linux
|
||||||
|
pytest
|
||||||
|
else
|
||||||
|
# Not Arch Linux, assuming Ubuntu
|
||||||
|
pytest-3
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user