Gitlab CI - Debugging
[tpg/opendispense2.git] / .gitlab-ci.yml
1 # This file is a template, and might need editing before it works on your project.
2 # use the official gcc image, based on debian
3 # can use verions as well, like gcc:5.2
4 # see https://hub.docker.com/_/gcc/
5 image: gcc
6
7 build:
8   stage: build
9   # instead of calling g++ directly you can also use some build toolkit like make
10   # install the necessary build tools when needed
11   before_script:
12     - apt update
13     - apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident-dev
14   script:
15     - make -C src/
16   artifacts:
17     paths:
18       - dispense
19       - cokebank_sqlite.so
20       - dispsrv
21       # depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
22       # cache:
23       #   paths:
24       #     - "*.o"
25
26 # run tests using the binary built before
27 test:
28   stage: test
29   before_script:
30     # Install the -dev versions to avoid needing to find the actual library names
31     - apt update && apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident netcat sqlite3
32     - useradd testuser && chown -R testuser .
33     # SETUID on the client, so it can use AUTOAUTH (ident doesn't work on the container)
34     - chmod u+s dispense
35   script:
36     - cd tests && su -c './TEST_basic.sh' testuser
37   artifacts:
38     paths:
39       - tests/rundir/**

UCC git Repository :: git.ucc.asn.au