-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
85 lines (76 loc) · 1.94 KB
/
.gitlab-ci.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
image: python:3.8
stages:
# - build
- test
- package
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
LICORICE_WORKING_PATH: "$CI_PROJECT_DIR/examples/matrix_multiply"
cache:
- key:
files:
- install/requirements.txt
paths:
- .cache/pip
- venv/
- key: $CI_COMMIT_REF_SLUG
paths:
- apt-cache/
before_script:
# DOCKER
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -y
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y libopenblas-base libopenblas-dev sqlite3 libsqlite3-dev libmsgpack-dev libevent-dev gfortran netcat libasound2-dev
# SHELL
# - echo `whoami`
# - sudo apt-get update -y
# - sudo apt-get install -y libopenblas-base libopenblas-dev sqlite3 libsqlite3-dev libmsgpack-dev libevent-dev gfortran
- pip install --upgrade pip
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install "setuptools<60"
- pushd install
- pip install -r requirements-dev.txt
- popd
- pip install .
# build-binary:
# stage: build
# script:
# - pyinstaller packaging/licorice_onefile.spec -y
# artifacts:
# expire_in: 1 hr
# untracked: true
# paths:
# - dist/licorice
test-pip:
stage: test
needs: []
script:
- ulimit -r 49
- ulimit -l unlimited
- pytest
test-binary:
stage: test
# needs:
# - build-binary
script:
- pyinstaller packaging/licorice_onedir.spec -y # TODO move to build
- dist/licorice/licorice parse matrix_multiply -y
- dist/licorice/licorice compile matrix_multiply -y
- dist/licorice/licorice run matrix_multiply -y
package-test-pypi:
stage: package
needs:
- test-pip
script:
- python setup.py sdist
- twine upload dist/*
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
# package-binary:
# stage: package
# needs:
# - test-binary
# script:
# - echo "TODO Upload binary to release"