.gitlab-ci.yml 2.93 KB
Newer Older
Ievgen Vovk's avatar
Ievgen Vovk committed
1
before_script:
Ievgen Vovk's avatar
Ievgen Vovk committed
2
    - printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
Ievgen Vovk's avatar
Ievgen Vovk committed
3
    - apt-get update -qq
Ievgen Vovk's avatar
Ievgen Vovk committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    # Installing GCC
    - apt-get install -yq make gcc g++
    
    # Installing auxiliary software
    - apt-get install -yq wget zlib1g-dev bzip2 libssl-dev libbz2-dev 
    - apt-get install -yq tcl tcl-dev tk tk-dev tcl8.6 libtk8.6
    - apt-get install -yq libssl1.0.0 libssl-dev
    
    # Downloading Python 3.7
    - cd /opt
    - wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
    - echo "41b6595deb4147a1ed517a7d9a580271 Python-3.7.0.tgz" > Python-3.7.0.tgz.md5sum
    - md5sum -c Python-3.7.0.tgz.md5sum
    
    # Preparing the sources
Ievgen Vovk's avatar
Ievgen Vovk committed
19
    - tar -xf Python-3.7.0.tgz
Ievgen Vovk's avatar
Ievgen Vovk committed
20
21
    - cd Python-3.7.0
    
Ievgen Vovk's avatar
Ievgen Vovk committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    - echo -e "--- Setup.dist.orig	2019-04-12 21:08:41.000000000 +0200" > Setup.dist.diff
    - echo -e "+++ Setup.dist	2019-04-12 21:09:04.909204191 +0200" >> Setup.dist.diff
    - echo -e "@@ -208,10 +208,10 @@" >> Setup.dist.diff
    - echo -e "" >> Setup.dist.diff
    - echo -e "# Socket module helper for SSL support; you must comment out the other" >> Setup.dist.diff
    - echo -e "# socket line above, and possibly edit the SSL variable:" >> Setup.dist.diff
    - echo -e "-#SSL=/usr/local/ssl" >> Setup.dist.diff
    - echo -e "-#_ssl _ssl.c \\" >> Setup.dist.diff
    - echo -e "-#	-DUSE_SSL -I\$(SSL)/include -I\$(SSL)/include/openssl \\" >> Setup.dist.diff
    - echo -e "-#	-L\$(SSL)/lib -lssl -lcrypto" >> Setup.dist.diff
    - echo -e "+SSL=/usr/local/ssl" >> Setup.dist.diff
    - echo -e "+_ssl _ssl.c \\" >> Setup.dist.diff
    - echo -e "+	-DUSE_SSL -I\$(SSL)/include -I\$(SSL)/include/openssl \\" >> Setup.dist.diff
    - echo -e "+	-L\$(SSL)/lib -lssl -lcrypto" >> Setup.dist.diff
    - echo -e "" >> Setup.dist.diff
    - echo -e "# The crypt module is now disabled by default because it breaks builds" >> Setup.dist.diff
    - echo -e "# on many systems (where -lcrypt is needed), e.g. Linux (I believe)." >> Setup.dist.diff
    
    - cd Modules
    - patch < ../Setup.dist.diff
    - cd ../
    
Ievgen Vovk's avatar
Ievgen Vovk committed
44
    # Compiling Python 3.7
Ievgen Vovk's avatar
Ievgen Vovk committed
45
    - ./configure --enable-shared --with-ssl-default-suites=openssl
Ievgen Vovk's avatar
Ievgen Vovk committed
46
47
48
49
50
51
52
53
54
55
56
57
58
    - make
    - make install
    
    # Linking executables
    - ln -s /usr/local/bin/python* /usr/bin/
    
    # Linking libraries
    - ln -s /usr/local/lib/libpython* /usr/lib/x86_64-linux-gnu/
    
    # Cleaning up
    - cd /opt/
    - rm -rf Python-3.7.0.tgz
    - rm -rf /opt/Python-3.7.0
Ievgen Vovk's avatar
Ievgen Vovk committed
59

Ievgen Vovk's avatar
Ievgen Vovk committed
60
61
62
63
64
    #- apt-get install -y -qq python3-pip
    - export CTAPIPE_VERSION=master
    - pip3 install https://github.com/cta-observatory/ctapipe/archive/$CTAPIPE_VERSION.tar.gz
    - pip3 install https://github.com/cta-observatory/ctapipe-extra/archive/$CTAPIPE_VERSION.tar.gz
    - pip3 install -e .
Ievgen Vovk's avatar
Ievgen Vovk committed
65
    
Ievgen Vovk's avatar
Ievgen Vovk committed
66
67
68
69
run_tests:
    script:
        - echo "Yes!"
        # - pytest -vvs