.gitlab-ci.yml 1.61 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"
4 5

build_ip_and_tests:
Martin Jeřábek's avatar
Martin Jeřábek committed
6
    allow_failure: true
7
    stage: build
8 9
    artifacts:
        paths: &vunit_build_paths
10
            - test/build
11
        expire_in: 1 hour
12 13
    script:
        - cd test
Martin Jeřábek's avatar
Martin Jeřábek committed
14
        - make elaborate
15 16 17 18 19
    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
20

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

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

46
test_ip_nightly:
47
    stage: test
48
    dependencies: [build_ip_and_tests]
49 50 51 52
    only:
        - schedules
    script:
        - cd test
53
        - make test_nightly
54
    artifacts:
55
        when: always
56
        paths:
57
            - test/test_nightly.xml
58 59 60 61 62 63 64 65
            - test/xunit.xsl

pages:
    stage: deploy
    when: always
    #dependencies: [test_ip_unit, test_ip_sanity]
    script:
        - mkdir -p public
66 67 68
        - cp test/xunit.xsl public/
        - cp test/test_*.xml public/
        - mv test/code_html public/coverage || true
69 70 71 72 73
    only:
        - master
    artifacts:
        paths:
            - public