-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
44 lines (42 loc) · 1.41 KB
/
.gitlab-ci.yml
File metadata and controls
44 lines (42 loc) · 1.41 KB
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
# This file is a template, and might need editing before it works on your project.
# use the official gcc image, based on debian
# can use verions as well, like gcc:5.2
# see https://hub.docker.com/_/gcc/
image: gcc
build:
stage: build
# instead of calling g++ directly you can also use some build toolkit like make
# install the necessary build tools when needed
before_script:
- apt update
- apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident-dev
script:
- make -C src/
artifacts:
paths:
- dispense
- cokebank_sqlite.so
- dispsrv
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
# - "*.o"
# run tests using the binary built before
test:
stage: test
before_script:
# Install the -dev versions to avoid needing to find the actual library names
- apt update && apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident netcat-traditional sqlite3 oidentd
- useradd testuser && chown -R testuser .
# SETUID on the client, so it can use AUTOAUTH (ident doesn't work on the container)
- chmod u+s dispense
- ls -l dispense
# Spawn oidentd
- /usr/sbin/oidentd
script:
- cd tests && su -c './TEST_basic.sh' testuser
after_script:
- cat tests/rundir/basic/server.log
artifacts:
paths:
- tests/rundir/basic/server.log