From 02ae413ab77b5965b4b116d03b27d6af9ad641b7 Mon Sep 17 00:00:00 2001 From: DavidLP <pohl@physik.uni-bonn.de> Date: Tue, 17 Nov 2020 10:55:57 +0100 Subject: [PATCH] DEB --- .gitlab-ci.yml | 69 +++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d4bbaf57..5ad50f13a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,12 @@ -#stages: -# - test -# - report +stages: + - codestyle + - test + - report # Tests using RD53 and FPGA co-simulation test:rd53: stage: test + needs: [] variables: # Otherwise lock file of cancelled runs might stall future check outs # https://gitlab.cern.ch/silab/bdaq53/issues/293 @@ -28,33 +30,12 @@ test:rd53: - cd bdaq53/tests - source setup_questa.sh > /dev/null - pytest -s -v rd53a/test_rd53 - -# Tests for code style violations in new code lines -codestyle:code_style: - stage: codestyle - variables: - # Otherwise lock file of cancelled runs might stall future check outs - # https://gitlab.cern.ch/silab/bdaq53/issues/293 - GIT_STRATEGY: clone - tags: # tags to differentiate runners able to run the job - - docker # Use CERN shared runners - image: continuumio/anaconda3:latest # Ubuntu based miniconda image - before_script: - # Update miniconda python and install required binary packages - - conda update --yes conda - - conda install --yes numpy bitarray pytest pyyaml scipy numba pytables pyqt matplotlib tqdm pyzmq blosc psutil pexpect coloredlogs flake8 iminuit lxml - - pip install flake8-diff - # Install basil tag from github - - git clone -b development --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; - # - if [ -z "$CI_COMMIT_TAG"]; then git clone -b v3.0.0 --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; else git clone -b development --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; fi - script: - - python setup.py develop - - flake8-diff origin/development # check code style flaws of changed lines agains development branch # Tests bdaq software without hardware co-simulation, do scan tests on different runner to save time test:software: stage: test - needs: ["codestyle:code_style"] + needs: + - codestyle:code_style variables: # Otherwise lock file of cancelled runs might stall future check outs # https://gitlab.cern.ch/silab/bdaq53/issues/293 @@ -99,8 +80,8 @@ test:software: # Tests for scan script regressions in software without hardware co-simulation test:scans: stage: test - #needs: - # - test:code_style + needs: + - codestyle:code_style variables: # Otherwise lock file of cancelled runs might stall future check outs # https://gitlab.cern.ch/silab/bdaq53/issues/293 @@ -144,8 +125,8 @@ test:scans: # Tests for scan script regressions in software without hardware co-simulation test:analysis: stage: test - #needs: - # - test:code_style + needs: + - codestyle:code_style variables: # Otherwise lock file of cancelled runs might stall future check outs # https://gitlab.cern.ch/silab/bdaq53/issues/293 @@ -225,8 +206,8 @@ report:coverage: # Tests for eudaq newest v1.x-dev branch compatibility test:eudaq: stage: test - #needs: - # - test:code_style + needs: + - codestyle:code_style variables: # Otherwise lock file of cancelled runs might stall future check outs # https://gitlab.cern.ch/silab/bdaq53/issues/293 @@ -266,6 +247,7 @@ test:eudaq: # Gitlab-runner with shell executor: https://docs.gitlab.com/runner/executors/ test:hardware: stage: test + needs: [] allow_failure: true variables: GIT_STRATEGY: clone @@ -309,9 +291,32 @@ test:hardware: - "BDAQ53_1LANE_RX640.bit" expire_in: 1 month +# Tests for code style violations in new code lines +codestyle:code_style: + stage: codestyle + variables: + # Otherwise lock file of cancelled runs might stall future check outs + # https://gitlab.cern.ch/silab/bdaq53/issues/293 + GIT_STRATEGY: clone + tags: # tags to differentiate runners able to run the job + - docker # Use CERN shared runners + image: continuumio/anaconda3:latest # Ubuntu based miniconda image + before_script: + # Update miniconda python and install required binary packages + - conda update --yes conda + - conda install --yes numpy bitarray pytest pyyaml scipy numba pytables pyqt matplotlib tqdm pyzmq blosc psutil pexpect coloredlogs flake8 iminuit lxml + - pip install flake8-diff + # Install basil tag from github + - git clone -b development --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; + # - if [ -z "$CI_COMMIT_TAG"]; then git clone -b v3.0.0 --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; else git clone -b development --depth 1 https://github.com/SiLab-Bonn/basil.git; cd basil; python setup.py develop; cd ..; fi + script: + - python setup.py develop + - flake8-diff origin/development # check code style flaws of changed lines agains development branch + # Tests using ITkPixV1 and FPGA co-simulation test:itkpixv1: stage: test + needs: [] variables: GIT_STRATEGY: clone tags: # tags to differentiate runners able to run the job -- GitLab