Skip to content
Snippets Groups Projects
Commit 344e20ca authored by WXbet's avatar WXbet
Browse files

Introduce build test pipeline

- automatic build via make and cmake + startup tests on Merge Requests
parent 0cf87d1a
No related branches found
No related tags found
No related merge requests found
Pipeline #492 passed
.build-oscam:
stages:
- build
- test
- deploy
oscam-make-build:
stage: build
tags:
- buildtest
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- export LC_ALL=C
- DISABLE_OPT="WITH_ARM_NEON"
- echo "List some debug information..."
- openssl version
- if ! ls -la /usr/lib/libdvbcsa.* 2>/dev/null; then
if ! ls -la /usr/local/lib/libdvbcsa.* 2>/dev/null; then
DISABLE_OPT+=" MODULE_STREAMRELAY";
fi;
fi;
- if ! ls -la /usr/include/openssl/aes.h 2>/dev/null; then DISABLE_OPT+=" WITH_SSL"; fi
- echo "Build oscam via make"
- ./config.sh --enable all
- make OSCAM_BIN=Distribution/oscam
- Distribution/oscam --help | head -n 12
- ./config.sh --enable all --disable $DISABLE_OPT | tee Distribution/oscam-make-build.log
- make OSCAM_BIN=Distribution/oscam | tee -a Distribution/oscam-make-build.log
artifacts:
paths:
- Distribution/oscam
- Distribution/oscam-make-build.log
expire_in: 1 hour
oscam-cmake-build:
stage: build
tags:
- buildtest
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- export LC_ALL=C
- DISABLE_OPT="WITH_ARM_NEON"; CMAKE_OPT="-DWITH_ARM_NEON=0";
- echo "List some debug information..."
- openssl version
- if ! ls -la /usr/lib/libdvbcsa.* 2>/dev/null; then
if ! ls -la /usr/local/lib/libdvbcsa.* 2>/dev/null; then
DISABLE_OPT+=" MODULE_STREAMRELAY";
else
CMAKE_OPT+=" -DHAVE_LIBDVBCSA=1";
fi;
else
CMAKE_OPT+=" -DHAVE_LIBDVBCSA=1";
fi;
- if ! ls -la /usr/include/openssl/aes.h 2>/dev/null; then
DISABLE_OPT+=" WITH_SSL";
fi;
- echo "Build oscam via cmake"
- rm -rf build; mkdir build; cd build
- ../config.sh --enable all
- cmake -DHAVE_PCSC=0 -DHAVE_LIBUSB=0 -DHAVE_LIBDVBCSA=1 ..
- make
- ./oscam --help | head -n 12
- ../config.sh --enable all --disable $DISABLE_OPT | tee oscam-make-build.log
- cmake $CMAKE_OPT .. | tee -a oscam-make-build.log
- make | tee -a oscam-make-build.log
artifacts:
paths:
- build/oscam
- build/oscam-make-build.log
expire_in: 1 hour
oscam-make-test:
stage: test
tags:
- buildtest
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
needs: [oscam-make-build]
script:
- echo -e "[global]\nlogfile = ;stdout\n\n[streamrelay]\nstream_relay_enabled = 1\n\n[dvbapi]\nenabled = 0" > Distribution/oscam.conf
- Distribution/oscam --help | head -n 12 | tee oscam-make-test.log
- if timeout 3 Distribution/oscam --config-dir ./Distribution/ --temp-dir ./Distribution/ | tee -a oscam-make-test.log; then echo; fi
artifacts:
paths:
- oscam-make-test.log
expire_in: 1 hour
oscam-cmake-test:
stage: test
tags:
- buildtest
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
needs: [oscam-cmake-build]
script:
- echo -e "[global]\nlogfile = ;stdout\n\n[streamrelay]\nstream_relay_enabled = 1\n\n[dvbapi]\nenabled = 0" > build/oscam.conf
- build/oscam --help | head -n 12 | tee oscam-cmake-test.log
- if timeout 3 build/oscam --config-dir ./build/ --temp-dir ./build/ | tee -a oscam-cmake-test.log; then echo; fi
artifacts:
paths:
- oscam-cmake-test.log
expire_in: 1 hour
clean-code:
stage: deploy
tags:
- cleansing
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $GITLAB_USER_NAME != 'pipeline-user'
dependencies: []
script:
- export LC_ALL=C
- echo "Fixing trailing whitespaces automation process..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment