forked from PyO3/maturin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-dockerfile.sh
executable file
·55 lines (34 loc) · 1.73 KB
/
test-dockerfile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# Builds all 5 test crates using the docker container,
# installs the wheel and checks that the installed package is functional
set -e
rm -rf venv-docker
python3.6 -m venv venv-docker
source venv-docker/bin/activate
pip install cffi > /dev/null
docker run --rm -v $(pwd)/test-crates/hello-world:/io maturin build --no-sdist -b bin
pip install hello-world --no-index --find-links test-crates/hello-world/target/wheels/
if [[ $(python test-crates/hello-world/check_installed/check_installed.py) != 'SUCCESS' ]]; then
exit 1
fi
docker run --rm -v $(pwd)/test-crates/cffi-pure:/io maturin build --no-sdist -b cffi
pip install cffi-pure --no-index --find-links test-crates/cffi-pure/target/wheels/
if [[ $(python test-crates/cffi-pure/check_installed/check_installed.py) != 'SUCCESS' ]]; then
exit 1
fi
docker run --rm -v $(pwd)/test-crates/cffi-mixed:/io maturin build --no-sdist -b cffi
pip install cffi-mixed --no-index --find-links test-crates/cffi-mixed/target/wheels/
if [[ $(python test-crates/cffi-mixed/check_installed/check_installed.py) != 'SUCCESS' ]]; then
exit 1
fi
docker run --rm -e RUSTUP_TOOLCHAIN=nightly-2019-08-21 -v $(pwd)/test-crates/pyo3-pure:/io maturin build --no-sdist -i python3.6
pip install pyo3-pure --no-index --find-links test-crates/pyo3-pure/target/wheels/
if [[ $(python test-crates/pyo3-pure/check_installed/check_installed.py) != 'SUCCESS' ]]; then
exit 1
fi
docker run --rm -e RUSTUP_TOOLCHAIN=nightly-2019-08-21 -v $(pwd)/test-crates/pyo3-mixed:/io maturin build --no-sdist -i python3.6
pip install pyo3-mixed --no-index --find-links test-crates/pyo3-mixed/target/wheels/
if [[ $(python test-crates/pyo3-mixed/check_installed/check_installed.py) != 'SUCCESS' ]]; then
exit 1
fi
deactivate