-
Notifications
You must be signed in to change notification settings - Fork 43
/
.gitlab-ci.yml
74 lines (63 loc) · 2.34 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
doitall:
image: liberforce/buildfarm:trusty
tags:
- privileged
variables:
# Pretend we're Travis so the scripts in the 'ci' dir work
TRAVIS_OS_NAME: 'linux'
LOGNAME: 'gitlab-runner'
locales: 'en_US.UTF-8 fr_FR.UTF-8'
packages: >
libpython2.7-dev
python-pip
wget
openssh-server
subversion
doxygen
gdb
ninja-build
swig
python-enchant
vim
qt4-linguist-tools
gettext
zip
rsync
before_script:
# Handle SSH authentication to the internal gitlab server
# Source: https://docs.gitlab.com/ee/ci/ssh_keys/README.html#ssh-keys-when-using-the-docker-executor
# Install ssh-agent if not already installed, it is required by Docker.
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIVATE_KEY")
# For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
# - mkdir -p ~/.ssh
#- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# In order to properly check the server's host key, assuming you created the
# SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
# instead.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
# before_install
- sudo apt-get update && sudo apt-get install -y ${packages}
# Run the ssh server
- sudo service ssh start
# Make sure the fr_FR locale is available and UTF-8 is available
- sudo locale-gen ${locales}
- export LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
# Always use an up-to-date version of pip
- python -m pip install --user "pip<21" wheel --upgrade
- export PATH=$HOME/.local/bin:$PATH
- pip install -r requirements.txt --user
- pip install -e . --user
script:
# Make sure ssh user@localhost works (for qibuild deploy tests)
- bash -xe ci/setup-ssh.sh
- bash -xe ci/setup-git.sh
- make -C python