-
Notifications
You must be signed in to change notification settings - Fork 219
/
.gitlab-ci.yml
74 lines (66 loc) · 2.13 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
---
stages:
- test
- build
.mbusd_job_template: &mbusd_job_template # Hidden key that defines an anchor
image: debian:stable
artifacts:
# create an archive with a name of the current stage and branch name
name: "${CI_BUILD_STAGE}_${CI_BUILD_REF_NAME}"
expire_in: 6 months
paths:
- output.dir/mbusd
- output.dir/mbusd.8
- conf/mbusd.conf.example
- output.dir/mbusd@.service
- output.dir/mbusd*.deb
- output.dir/mbusd*.rpm
build:fedora_x86:
<<: *mbusd_job_template
image: fedora:latest
stage: build
before_script:
- yum -y install make cmake pkgconfig gcc-c++ rpmdevtools
script:
- mkdir output.dir/
- cd output.dir
- cmake -D CMAKE_BUILD_TYPE=Debug -DSYSTEMD_SERVICES_INSTALL_DIR=/usr/lib/systemd/system ../
- make package
build:deb_armhf:
<<: *mbusd_job_template
stage: build
before_script:
- apt update -qq
- apt install -y -qq build-essential pkg-config cmake gcc-arm-linux-gnueabihf
script:
- mkdir output.dir/
- cd output.dir
- cmake -DCMAKE_BUILD_TYPE=Release -DSYSTEMD_SERVICES_INSTALL_DIR=/lib/systemd/system -DCMAKE_TOOLCHAIN_FILE=../cmake/arm_linux_gnueabihf.cmake ../
- make package
build:deb_x86:
<<: *mbusd_job_template
stage: build
before_script:
- apt update -qq
- apt install -y -qq --no-install-recommends build-essential pkg-config cmake
script:
- mkdir output.dir/
- cd output.dir
- cmake -DCMAKE_BUILD_TYPE=Release -DSYSTEMD_SERVICES_INSTALL_DIR=/lib/systemd/system ../
- make package
test_x86:
stage: test
image: debian:stable
#https://forum.gitlab.com/t/testing-copy-yaml-file-to-build-folder/8309
before_script:
- apt update -qq
- apt install -y -qq --no-install-recommends build-essential pkg-config cmake
- apt install -y -qq --no-install-recommends python-dev python-pip python-setuptools socat
- python -m pip install pymodbus==2.2.0 service_identity==18.1.0 twisted==18.9.0
script:
- mkdir -p output.dir/ && cd $_
- cmake ../
- make
# execute all tests
- (cd ../ && python tests/run_itests.py output.dir/mbusd)
#- make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 test