.gitlab-ci.yml 1.67 KB
Newer Older
ulrich_y's avatar
ulrich_y committed
1 2 3 4 5 6
# To kill artifacts
#   curl --request DELETE --header "PRIVATE-TOKEN: `cat ~/.ssh/gitlab-token`" "https://gitlab.psi.ch/api/v4/projects/373/jobs/<jobid>/artifacts"

before_script:
    - date
    - whoami
ulrich_y's avatar
ulrich_y committed
7 8
    - export PATH=/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.4.0/bin/:/afs/psi.ch/sys/psi.x86_64_slp6/Programming/mathematica/11.0/Executables/:$PATH:/scratch/ulrich/usr/bin/
    - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/scratch/ulrich/usr/lib/:/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.4.0/lib64/:/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.4.0/lib
ulrich_y's avatar
fixes  
ulrich_y committed
9
    - export PERL5LIB=/scratch/ulrich/usr/lib64/perl5/:/scratch/ulrich/usr/share/perl5/
ulrich_y's avatar
ulrich_y committed
10
    - export PKG_CONFIG_PATH=/scratch/ulrich/usr/lib/pkgconfig
ulrich_y's avatar
ulrich_y committed
11 12 13 14 15 16
    - gfortran -v

cache:
    paths:
        - makefile
        - build/
17 18 19 20 21
        - checks/test-chen.f90
        - checks/test-chenff.f90
        - checks/test-muone.f90
        - checks/test-muoneNP.f90
    key: ${CI_COMMIT_REF_SLUG}
ulrich_y's avatar
ulrich_y committed
22 23 24 25 26 27 28 29 30 31 32

stages:
    - configure
    - build
    - cleanup_build
    - test

configure:
    stage: configure
    script:
        - mkdir usr/
ulrich_y's avatar
ulrich_y committed
33
        - ./configure --ci
ulrich_y's avatar
ulrich_y committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

compile:
    stage: build
    script:
        - make all
    artifacts:
        paths:
            - handyg.mod
            - libhandyg.a
            - geval
            - handyg
            - test
        expire_in: 1 week

clean_up_build_job:
    stage: cleanup_build
    script:
        - make clean
    when: on_failure

test:
    stage: test
    script:
        - pwd
        - ls
        - make check
ulrich_y's avatar
ulrich_y committed
60 61
        - make coverage
        - cat report/lcov.report
ulrich_y's avatar
ulrich_y committed
62
    coverage: '/Total:\|(\d+\.?\d+\%)/'
ulrich_y's avatar
ulrich_y committed
63 64 65 66
    artifacts:
        paths:
            - report/
        expire_in: 1 month