.gitlab-ci.yml 1.62 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 7 8

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

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

30
test_ip_fast:
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:
Martin Jeřábek's avatar
Martin Jeřábek committed
57
            - test/tests_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
        - cp test/xunit.xsl public/
Martin Jeřábek's avatar
Martin Jeřábek committed
67
        - cp test/tests_*.xml public/
68
        - mv test/code_html public/coverage || true
69 70 71 72 73
    only:
        - master
    artifacts:
        paths:
            - public