.gitlab-ci.yml 1.55 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
    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
19

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

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

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

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