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

23
build_driver:
24
    stage: build
25
    only: *only
26 27 28 29
    script:
        - cd driver
        - "make -j`nproc`"

Martin Jeřábek's avatar
Martin Jeřábek committed
30 31 32 33 34 35 36 37
build_linux_driver:
    stage: build
    only: *only
    image: hathi.duckdns.org/user/ctucanfd_drvtest
    script:
        - cd driver/linux
        - "make -j`nproc` KDIR=/linux/build"

38
test_ip_fast:
39
    stage: test
40
    only: *only
41
    dependencies: [build_ip_and_tests]
42
    script:
43
        - cd test
44
        - make test_fast
Martin Jeřábek's avatar
Martin Jeřábek committed
45 46 47
        - make coverage
    coverage: "/lines......: ([^%]+%)/"
    artifacts:
48
        when: always
Martin Jeřábek's avatar
Martin Jeřábek committed
49
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
50
            - test/code_html
51
            - test/tests_fast.xml
52
            - test/xunit.xsl
53

54
test_ip_nightly:
55
    stage: test
56
    dependencies: [build_ip_and_tests]
57 58 59 60
    only:
        - schedules
    script:
        - cd test
61
        - make test_nightly
62
    artifacts:
63
        when: always
64
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
65
            - test/tests_nightly.xml
66 67 68 69 70 71 72 73
            - test/xunit.xsl

pages:
    stage: deploy
    when: always
    #dependencies: [test_ip_unit, test_ip_sanity]
    script:
        - mkdir -p public
74
        - cp test/xunit.xsl public/
Martin Jeřábek's avatar
Martin Jeřábek committed
75
        - cp test/tests_*.xml public/
76
        - mv test/code_html public/coverage || true
77 78 79 80 81
    only:
        - master
    artifacts:
        paths:
            - public