.gitlab-ci.yml 1.65 KB
Newer Older
Martin Jeřábek's avatar
Martin Jeřábek committed
1
image: mjerabek/ghdl:upstream-gcc
2
before_script:
3
    - "export PATH=/opt/ghdl/bin:$PATH"
Martin Jeřábek's avatar
Martin Jeřábek committed
4 5
    - export LC_ALL=C.UTF-8
    - export LANG=C.UTF-8
6
    - export PYTHONUNBUFFERED=1
7 8 9

build_ip_and_tests:
    stage: build
10 11
    artifacts:
        paths: &vunit_build_paths
12
            - test/build
13
        expire_in: 1 hour
14 15
    script:
        - cd test
Martin Jeřábek's avatar
Martin Jeřábek committed
16
        - make elaborate
17 18 19 20 21
    only: &only
        - master     # Run on all changes to master branch
        - tags       # Run on all tags
        - triggers   # Run by trigger (on merge request)
        - web        # Run by manual request from web UI
22

Martin Jeřábek's avatar
Martin Jeřábek committed
23
.build_driver:
24 25
    stage: build
    allow_failure: true
26
    only: *only
27 28 29 30
    script:
        - cd driver
        - "make -j`nproc`"

31
test_ip_fast:
32
    stage: test
33
    only: *only
34
    dependencies: [build_ip_and_tests]
35
    script:
36
        - cd test
37
        - make test_fast
Martin Jeřábek's avatar
Martin Jeřábek committed
38 39 40
        - make coverage
    coverage: "/lines......: ([^%]+%)/"
    artifacts:
41
        when: always
Martin Jeřábek's avatar
Martin Jeřábek committed
42
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
43
            - test/code_html
44
            - test/tests_fast.xml
45
            - test/xunit.xsl
46

47
test_ip_nightly:
48
    stage: test
49
    dependencies: [build_ip_and_tests]
50 51 52 53
    only:
        - schedules
    script:
        - cd test
54
        - make test_nightly
55
    artifacts:
56
        when: always
57
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
58
            - test/tests_nightly.xml
59 60 61 62 63 64 65 66
            - test/xunit.xsl

pages:
    stage: deploy
    when: always
    #dependencies: [test_ip_unit, test_ip_sanity]
    script:
        - mkdir -p public
67
        - cp test/xunit.xsl public/
Martin Jeřábek's avatar
Martin Jeřábek committed
68
        - cp test/tests_*.xml public/
69
        - mv test/code_html public/coverage || true
70 71 72 73 74
    only:
        - master
    artifacts:
        paths:
            - public