Skip to content

Commit 17cb65e

Browse files
author
Ivan Dlugos
committed
CI - test the packaged wheel on linux x64 & armv7, mac x64
1 parent 3d0ac08 commit 17cb65e

2 files changed

Lines changed: 53 additions & 6 deletions

File tree

.gitlab-ci.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,62 @@
1+
stages:
2+
- build
3+
- test
4+
5+
before_script:
6+
- pip3 install virtualenv pytest
7+
18
build:
29
image: python:latest
10+
stage: build
311
script:
4-
# a function to download a library from another Gitlab repo's CI artifacts
12+
# a function to download a library from another Gitlab repos CI artifacts
513
- 'download_library(){ curl --create-dirs -o objectbox/lib/$1 -H "PRIVATE-TOKEN: $CI_API_TOKEN" $2; }'
614
- 'download_library x86_64/libobjectbox.so "${OBXLIB_URL_Linux64}"'
715
- 'download_library x86_64/libobjectbox.dylib "${OBXLIB_URL_Mac64}"'
816
- 'download_library armv7l/libobjectbox.so "${OBXLIB_URL_LinuxARMv7hf}"'
9-
- pip install virtualenv
1017
- make test
1118
- make build
1219
artifacts:
1320
expire_in: 1 days
1421
paths:
1522
- dist/*.whl
23+
24+
.test:
25+
stage: test
26+
script:
27+
- rm -r objectbox
28+
- pip3 install --force-reinstall dist/*.whl
29+
- python3 -m pytest
30+
31+
.test:linux:x64:
32+
extends: .test
33+
tags: [x64, docker, linux]
34+
35+
test:linux:x64:3.4:
36+
extends: .test:linux:x64
37+
image: python:3.4
38+
39+
test:linux:x64:3.5:
40+
extends: .test:linux:x64
41+
image: python:3.5
42+
43+
test:linux:x64:3.6:
44+
extends: .test:linux:x64
45+
image: python:3.6
46+
47+
test:linux:x64:3.7:
48+
extends: .test:linux:x64
49+
image: python:3.7
50+
51+
test:linux:x64:3.8:
52+
extends: .test:linux:x64
53+
image: python:3.8-rc
54+
55+
test:linux:armv7hf:
56+
extends: .test
57+
tags: [armv7hf, docker, linux]
58+
image: python:3.7
59+
60+
test:mac:x64:
61+
extends: .test
62+
tags: [mac, x64, shell, python3]

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ ${VENV}: ${VENV}/bin/activate
99
${VENV}/bin/activate: requirements.txt
1010
test -d ${VENV} || virtualenv ${VENV}
1111
# remove packages not in the requirements.txt
12-
pip freeze | grep -v -f requirements.txt - | grep -v '^#' | grep -v '^-e ' | xargs pip uninstall -y || echo "never mind"
12+
pip3 freeze | grep -v -f requirements.txt - | grep -v '^#' | grep -v '^-e ' | xargs pip3 uninstall -y || echo "never mind"
1313
# install and upgrade based on the requirements.txt
14-
pip install --upgrade -r requirements.txt
14+
pip3 install --upgrade -r requirements.txt
1515
# let make know this is the last time requirements changed
1616
touch ${VENV}/bin/activate
1717

1818
init: ${VENV}
1919

2020
test: ${VENV}
21-
python -m pytest -s
21+
python3 -m pytest -s
2222

2323
build: ${VENV} clean
24-
python setup.py bdist_wheel
24+
python3 setup.py bdist_wheel
2525
ls -lh dist
2626

2727
clean:

0 commit comments

Comments
 (0)