.gitlab-ci.yml 1.6 KB
Newer Older
1
image: mjerabek/ghdl
2
before_script:
3
    - "export PATH=/opt/ghdl/bin:$PATH"
4 5 6

build_ip_and_tests:
    stage: build
7 8
    artifacts:
        paths: &vunit_build_paths
9
            - test/build
10
        expire_in: 1 hour
11 12
    script:
        - cd test
Martin Jeřábek's avatar
Martin Jeřábek committed
13
        - make elaborate
14 15 16 17 18 19
    only: &only
        - master     # Run on all changes to master branch
        - tags       # Run on all tags
        - schedules  # Run on schedule
        - 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_unit:
30
    stage: test
31
    only: *only
32
    dependencies: [build_ip_and_tests]
33
    script:
34
        - cd test
35
        - make test_unit XUNIT=1
Martin Jeřábek's avatar
Martin Jeřábek committed
36 37 38
        - make coverage
    coverage: "/lines......: ([^%]+%)/"
    artifacts:
39
        when: always
Martin Jeřábek's avatar
Martin Jeřábek committed
40
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
41 42
            - test/code_html
            - test/test_unit.xml
43
            - test/xunit.xsl
44 45 46

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

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