.gitlab-ci.yml 2.58 KB
Newer Older
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
16
        - make elaborate
17 18
        # Do not include the huge binaries in artifacts.
        - rm -R build/vunit_out/test_output
19 20 21 22 23
    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
24

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

32 33
build_doc:
    stage: build
34
    tags: [virt]  # runner in virtual, without docker, with new lyx
35 36 37 38
    only:
        - master
        - tags
        - web # debug only!
39
    #image: hathi.duckdns.org/user/lyx:buster
40
    script:
Martin Jeřábek's avatar
Martin Jeřábek committed
41 42 43
        - export LC_ALL=en_US.UTF-8
        - export LANG=en_US.UTF-8
        - export TMPDIR=/var/tmp # not enouhg room in tmpfs
44 45 46 47 48
        - make -C doc/core
    artifacts:
        paths:
            - doc/core/Progdokum.pdf

49 50 51 52 53 54 55
build_linux_driver:
    stage: build
    only: *only
    image: hathi.duckdns.org/user/ctucanfd_drvtest
    script:
        - cd driver/linux
        - "make -j`nproc` KDIR=/linux/build"
56 57 58
    artifacts:
        paths:
            - driver/linux/ctucanfd.ko
59

60
test_ip_fast:
61
    stage: test
62
    only: *only
63
    dependencies: [build_ip_and_tests]
64
    script:
65
        - cd test
66
        - make test_fast
67 68 69
        - make coverage
    coverage: "/lines......: ([^%]+%)/"
    artifacts:
70
        when: always
71
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
72
            - test/code_html
73
            - test/tests_fast.xml
74
            - test/xunit.xsl
75 76
        reports:
            junit: [test/tests_fast.xml]
77

78
test_ip_nightly:
79
    stage: test
80
    dependencies: [build_ip_and_tests]
81 82 83 84
    only:
        - schedules
    script:
        - cd test
85
        - make test_nightly
86
    artifacts:
87
        when: always
88
        paths:
Martin Jeřábek's avatar
Martin Jeřábek committed
89
            - test/tests_nightly.xml
90
            - test/xunit.xsl
91 92
        reports:
            junit: [test/tests_nightly.xml]
93 94 95 96 97 98 99

pages:
    stage: deploy
    when: always
    #dependencies: [test_ip_unit, test_ip_sanity]
    script:
        - mkdir -p public
100
        - cp test/xunit.xsl public/
Martin Jeřábek's avatar
Martin Jeřábek committed
101
        - cp test/tests_*.xml public/
102
        - mv test/code_html public/coverage || true
103
        - cp doc/core/Progdokum.pdf public/ || true
104 105 106 107 108
    only:
        - master
    artifacts:
        paths:
            - public