mirror of
https://github.com/3cky/mbusd.git
synced 2024-12-24 16:37:37 +01:00
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
---
|
|
stages:
|
|
- build
|
|
- test
|
|
|
|
.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: 1 day
|
|
paths:
|
|
- output.dir/mbusd
|
|
- doc/mbusd.8
|
|
|
|
build:linux_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=Debug -DCMAKE_TOOLCHAIN_FILE=../arm_linux_gnueabihf.cmake ../
|
|
- make
|
|
|
|
build:linux_x86:
|
|
<<: *mbusd_job_template
|
|
stage: build
|
|
before_script:
|
|
- apt update -qq
|
|
- apt install -y -qq build-essential pkg-config cmake
|
|
script:
|
|
- mkdir output.dir/
|
|
- cd output.dir
|
|
- cmake -D CMAKE_BUILD_TYPE=Debug ../
|
|
- make
|
|
|
|
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 build-essential pkg-config cmake
|
|
- apt install -y -qq python-dev python-pip python-setuptools socat
|
|
- 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_*
|