Skip to content
Snippets Groups Projects
Commit 8fe40a68 authored by Lars Krombeen's avatar Lars Krombeen
Browse files

Merge branch 'ci-optimization' into 'master'

Ci optimization

See merge request !57
parents 1e50de43 09051f1d
No related branches found
No related tags found
1 merge request!57Ci optimization
Pipeline #8548 passed
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
workflow: workflow:
rules: rules:
- if: '$CI_MERGE_REQUEST_TITLE =~ /(?i)(^WIP.*)/ || $CI_MERGE_REQUEST_TITLE =~ /(?i)(^DRAFT.*)/' # don't create a pipeline if its a commit pipeline, on a branch and that branch has open merge requests (bc we will get a MR build instead)
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never when: never
- when: always - when: always
...@@ -32,8 +33,6 @@ clang-format: ...@@ -32,8 +33,6 @@ clang-format:
stage: build stage: build
needs: ["build-base"] needs: ["build-base"]
image: idg_base:${CI_COMMIT_SHORT_SHA} image: idg_base:${CI_COMMIT_SHORT_SHA}
before_script:
- pip3 install clang-format==9.0.0
script: script:
- ./scripts/run-clang-format.sh - ./scripts/run-clang-format.sh
rules: rules:
...@@ -84,7 +83,6 @@ idg-test: ...@@ -84,7 +83,6 @@ idg-test:
needs: ["build-base"] needs: ["build-base"]
image: idg_base:${CI_COMMIT_SHORT_SHA} image: idg_base:${CI_COMMIT_SHORT_SHA}
script: script:
- pip3 install gcovr
- mkdir build - mkdir build
- cd build - cd build
- cmake .. -DCMAKE_CXX_FLAGS="-coverage" -DCMAKE_EXE_LINKER_FLAGS="-coverage" -DBUILD_TESTING=On - cmake .. -DCMAKE_CXX_FLAGS="-coverage" -DCMAKE_EXE_LINKER_FLAGS="-coverage" -DBUILD_TESTING=On
...@@ -92,8 +90,9 @@ idg-test: ...@@ -92,8 +90,9 @@ idg-test:
- export LD_LIBRARY_PATH=$(pwd)/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=$(pwd)/lib:$LD_LIBRARY_PATH
- ctest -j8 --verbose -LE integration - ctest -j8 --verbose -LE integration
# Capture coverage # Capture coverage
- gcovr -r .. -e '.*/tests/.*' -e '.*/CompilerIdCXX/.*' -e '.*/external/.*' - gcovr -r .. -e '.*/tests/.*' -e '.*/CompilerIdCXX/.*' -e '.*/external/.*' --json -o run-unit.json
- gcovr -r .. -e '.*/tests/.*' -e '.*/CompilerIdCXX/.*' -e '.*/external/.*' --xml > coverage.xml - gcovr --add-tracefile run-unit.json --xml > coverage.xml
- gcovr --add-tracefile run-unit.json
rules: rules:
- when: on_success - when: on_success
artifacts: artifacts:
...@@ -105,7 +104,6 @@ idg-integration-docker: ...@@ -105,7 +104,6 @@ idg-integration-docker:
image: idg_integration:${CI_COMMIT_SHORT_SHA} image: idg_integration:${CI_COMMIT_SHORT_SHA}
needs: ["build-integration"] needs: ["build-integration"]
before_script: before_script:
- pip3 install pytest pytest-lazy-fixture h5py
- export HOME_DIR=$PWD - export HOME_DIR=$PWD
# Install IDG # Install IDG
- mkdir /opt/idg && mkdir build - mkdir /opt/idg && mkdir build
......
...@@ -3,4 +3,5 @@ FROM ubuntu:20.04 ...@@ -3,4 +3,5 @@ FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
apt-get install -y \ apt-get install -y \
libboost-all-dev g++ cmake libfftw3-dev liblapacke-dev \ libboost-all-dev g++ cmake libfftw3-dev liblapacke-dev \
python3 python3-pip python3 python3-pip && \
\ No newline at end of file pip3 install clang-format==9.0.0 gcovr
\ No newline at end of file
...@@ -36,4 +36,4 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \ ...@@ -36,4 +36,4 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
&& tar xfz /WSRT_Measures.ztar \ && tar xfz /WSRT_Measures.ztar \
&& rm /WSRT_Measures.ztar \ && rm /WSRT_Measures.ztar \
# Install some python packages # Install some python packages
&& pip3 install astropy scipy && pip3 install astropy scipy pytest pytest-lazy-fixture h5py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment