2017-11-09 21:45:19 +01:00
|
|
|
---
|
2017-11-12 12:03:01 +01:00
|
|
|
stages:
|
2017-11-29 12:02:36 +01:00
|
|
|
- test
|
2018-06-18 21:33:01 +02:00
|
|
|
- build
|
2017-11-12 12:03:01 +01:00
|
|
|
|
2017-11-19 13:07:38 +01:00
|
|
|
.mbusd_job_template: &mbusd_job_template # Hidden key that defines an anchor
|
|
|
|
image: debian:stable
|
|
|
|
artifacts:
|
2017-11-29 12:41:20 +01:00
|
|
|
# create an archive with a name of the current stage and branch name
|
|
|
|
name: "${CI_BUILD_STAGE}_${CI_BUILD_REF_NAME}"
|
2018-03-05 15:19:52 +01:00
|
|
|
expire_in: 6 months
|
2017-11-29 12:41:20 +01:00
|
|
|
paths:
|
|
|
|
- output.dir/mbusd
|
2017-11-29 22:34:32 +01:00
|
|
|
- output.dir/mbusd.8
|
2017-11-29 17:11:43 +01:00
|
|
|
- conf/mbusd.conf.example
|
2017-11-29 22:34:32 +01:00
|
|
|
- output.dir/mbusd@.service
|
2017-12-04 16:43:10 +01:00
|
|
|
- output.dir/mbusd*.deb
|
|
|
|
- output.dir/mbusd*.rpm
|
2017-11-19 13:07:38 +01:00
|
|
|
|
2018-03-05 15:19:52 +01:00
|
|
|
build:fedora_x86:
|
|
|
|
<<: *mbusd_job_template
|
|
|
|
image: fedora:latest
|
|
|
|
stage: build
|
|
|
|
before_script:
|
2018-05-15 11:33:51 +02:00
|
|
|
- yum -y install make cmake pkgconfig gcc-c++ rpmdevtools
|
2018-03-05 15:19:52 +01:00
|
|
|
script:
|
|
|
|
- mkdir output.dir/
|
|
|
|
- cd output.dir
|
|
|
|
- cmake -D CMAKE_BUILD_TYPE=Debug -DSYSTEMD_SERVICES_INSTALL_DIR=/usr/lib/systemd/system ../
|
|
|
|
- make package
|
|
|
|
|
2017-12-04 16:43:10 +01:00
|
|
|
build:deb_armhf:
|
2017-11-19 13:07:38 +01:00
|
|
|
<<: *mbusd_job_template
|
|
|
|
stage: build
|
2017-11-29 12:41:20 +01:00
|
|
|
before_script:
|
2017-11-29 12:52:55 +01:00
|
|
|
- apt update -qq
|
2018-06-18 16:51:46 +02:00
|
|
|
- apt install -y -qq build-essential pkg-config cmake gcc-arm-linux-gnueabihf
|
2017-11-19 13:07:38 +01:00
|
|
|
script:
|
2017-11-29 12:02:36 +01:00
|
|
|
- mkdir output.dir/
|
|
|
|
- cd output.dir
|
2018-03-05 15:19:52 +01:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=Release -DSYSTEMD_SERVICES_INSTALL_DIR=/lib/systemd/system -DCMAKE_TOOLCHAIN_FILE=../cmake/arm_linux_gnueabihf.cmake ../
|
2017-12-04 16:43:10 +01:00
|
|
|
- make package
|
2017-11-19 13:07:38 +01:00
|
|
|
|
2017-12-04 16:43:10 +01:00
|
|
|
build:deb_x86:
|
2017-11-19 13:07:38 +01:00
|
|
|
<<: *mbusd_job_template
|
|
|
|
stage: build
|
2017-11-29 12:41:20 +01:00
|
|
|
before_script:
|
2017-11-29 12:52:55 +01:00
|
|
|
- apt update -qq
|
2018-06-18 16:46:17 +02:00
|
|
|
- apt install -y -qq --no-install-recommends build-essential pkg-config cmake
|
2017-11-09 21:45:19 +01:00
|
|
|
script:
|
2017-11-29 12:02:36 +01:00
|
|
|
- mkdir output.dir/
|
|
|
|
- cd output.dir
|
2018-03-05 15:19:52 +01:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=Release -DSYSTEMD_SERVICES_INSTALL_DIR=/lib/systemd/system ../
|
2017-12-04 16:43:10 +01:00
|
|
|
- make package
|
|
|
|
|
2017-11-29 12:02:36 +01:00
|
|
|
|
|
|
|
test_x86:
|
|
|
|
stage: test
|
2017-11-29 12:41:20 +01:00
|
|
|
image: debian:stable
|
2017-11-29 12:02:36 +01:00
|
|
|
#https://forum.gitlab.com/t/testing-copy-yaml-file-to-build-folder/8309
|
|
|
|
before_script:
|
2017-11-29 12:52:55 +01:00
|
|
|
- apt update -qq
|
2018-06-18 16:46:17 +02:00
|
|
|
- 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
|
2019-04-21 22:36:49 +02:00
|
|
|
- python -m pip install pymodbus==2.2.0 service_identity==18.1.0 twisted==18.9.0
|
2017-11-29 12:02:36 +01:00
|
|
|
|
|
|
|
script:
|
2018-06-18 16:46:17 +02:00
|
|
|
- mkdir -p output.dir/ && cd $_
|
2018-05-16 22:01:11 +02:00
|
|
|
- cmake ../
|
|
|
|
- make
|
2017-11-29 12:02:36 +01:00
|
|
|
|
|
|
|
# execute all tests
|
2018-06-18 16:46:17 +02:00
|
|
|
- (cd ../ && python tests/run_itests.py output.dir/mbusd)
|
|
|
|
#- make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 test
|