mbusd/.gitlab-ci.yml

61 lines
1.5 KiB
YAML
Raw Normal View History

2017-11-09 21:45:19 +01:00
---
2017-11-12 12:03:01 +01:00
stages:
2017-11-19 13:07:38 +01:00
- build
2017-11-29 12:02:36 +01:00
- test
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}"
expire_in: 1 day
paths:
- output.dir/mbusd
- doc/mbusd.8
- conf/mbusd.conf.example
2017-11-19 13:07:38 +01:00
2017-11-29 12:02:36 +01:00
build:linux_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
- 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
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../arm_linux_gnueabihf.cmake ../
- make
2017-11-19 13:07:38 +01:00
2017-11-29 12:02:36 +01:00
build:linux_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
- apt install -y -qq 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
- cmake -D CMAKE_BUILD_TYPE=Debug ../
- make
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
2017-11-29 12:41:20 +01:00
- apt install -y -qq build-essential pkg-config cmake
- apt install -y -qq python-dev python-pip python-setuptools socat
2017-11-29 12:02:36 +01:00
- python -m pip install pymodbus service_identity
dependencies:
- build:linux_x86
script:
- mkdir -p output.dir/
- cd output.dir
- cmake -DTESTS=True ../
- make VERBOSE=1
# execute all tests
- ./test_*