.gitlab-ci.yml 4.33 KB
Newer Older
1 2 3 4 5 6 7 8
stages:
    - build
    - unit-tests
    - functional-tests

variables:
  GIT_SUBMODULE_STRATEGY: normal

9 10
build:linux:
    image: registry.videolan.org:5000/medialibrary:20190121111050
11 12 13
    tags:
      - debian
      - amd64
14 15
    except:
        - schedules
16 17 18 19 20 21 22 23 24 25 26 27
    stage: build
    script:
      - ./bootstrap
      - ./configure --enable-tests
      - make -j4
      - make -j4 check
    artifacts:
        paths:
          - unittest
          - samples
          - .libs/

28 29
unit-tests:linux:
    image: registry.videolan.org:5000/medialibrary:20190121111050
30 31 32
    tags:
      - debian
      - amd64
33 34
    except:
        - schedules
35
    stage: unit-tests
36 37
    dependencies:
        - build:linux
38 39 40
    script:
        - ./unittest

41 42
functional-tests:linux:
    image: registry.videolan.org:5000/medialibrary:20190121111050
43 44 45
    tags:
      - debian
      - amd64
46 47
    except:
        - schedules
48
    stage: functional-tests
49 50
    dependencies:
        - build:linux
51 52 53
    script:
        - ./samples -v

54 55
build:win32:
    image: registry.videolan.org:5000/medialibrary-win32:20190121122230
56 57
    tags:
      - win32
58 59
    except:
        - schedules
60 61 62 63 64 65 66 67 68 69 70 71 72
    stage: build
    script:
      - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/prefix/lib/pkgconfig"
      - ./bootstrap
      - ./configure --enable-tests --host=i686-w64-mingw32 --disable-shared
      - make -j4
      - make -j4 check
    artifacts:
        paths:
          - unittest.exe
          - samples.exe
          - .libs/

73 74 75 76
unit-tests:win32:
    image: registry.videolan.org:5000/medialibrary-win32:20190121122230
    tags:
      - win32
77 78
    except:
        - schedules
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
    stage: unit-tests
    dependencies:
        - build:win32
    script:
        - cp /prefix/dll/libvlc.dll .
        - cp /prefix/dll/libvlccore.dll .
        - ln -s /prefix/lib/vlc/plugins/ .
        - file libvlc.dll
        - file unittest.exe
        - wine unittest.exe

functional-tests:win32:
    image: registry.videolan.org:5000/medialibrary-win32:20190121122230
    tags:
      - win32
94 95
    except:
        - schedules
96 97 98 99 100 101 102 103 104 105 106
    stage: functional-tests
    dependencies:
        - build:win32
    script:
        - cp /prefix/dll/libvlc.dll .
        - cp /prefix/dll/libvlccore.dll .
        - ln -s /prefix/lib/vlc/plugins/ .
        - wine samples.exe -v

build:win64:
    image: registry.videolan.org:5000/medialibrary-win64:20190121124804
107 108 109
    tags:
      - win64
    stage: build
110 111
    except:
        - schedules
112 113 114 115 116 117 118 119 120 121 122 123
    script:
      - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/prefix/lib/pkgconfig"
      - ./bootstrap
      - ./configure --enable-tests --host=x86_64-w64-mingw32 --disable-shared
      - make -j4
      - make -j4 check
    artifacts:
        paths:
          - unittest.exe
          - samples.exe
          - .libs/

124 125 126 127
unit-tests:win64:
    image: registry.videolan.org:5000/medialibrary-win64:20190121124804
    tags:
      - win64
128 129
    except:
        - schedules
130 131 132 133 134 135 136 137 138 139 140 141 142
    stage: unit-tests
    dependencies:
        - build:win64
    script:
        - cp /prefix/dll/libvlc.dll .
        - cp /prefix/dll/libvlccore.dll .
        - ln -s /prefix/lib/vlc/plugins/ .
        - wine unittest.exe

functional-tests:win64:
    image: registry.videolan.org:5000/medialibrary-win64:20190121124804
    tags:
      - win64
143 144
    except:
        - schedules
145 146 147 148 149 150 151 152
    stage: functional-tests
    dependencies:
        - build:win64
    script:
        - cp /prefix/dll/libvlc.dll .
        - cp /prefix/dll/libvlccore.dll .
        - ln -s /prefix/lib/vlc/plugins/ .
        - wine samples.exe -v
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178

build-and-coverage:
    image: registry.videolan.org:5000/medialibrary:20190121111050
    tags:
      - debian
      - amd64
    only:
        - schedules
    stage: build
    script:
        - ./bootstrap
        - CXXFLAGS='--coverage -g -O0' LDFLAGS='--coverage -g -O0' ./configure --enable-tests
        - make -j4 check
        - ./unittest && ./samples
        - lcov --capture --directory . -o coverage.info
        - lcov --remove coverage.info "/usr/*" -o coverage.info
        - lcov --remove coverage.info "/prefix/*" -o coverage.info
        - lcov --remove coverage.info "$CI_PROJECT_DIR/test/*" -o coverage.info
        - lcov --remove coverage.info "$CI_PROJECT_DIR/googletest/*" -o coverage.info
        - lcov --summary coverage.info
        - genhtml coverage.info --output-directory html/
    artifacts:
        name: "coverage-medialibrary-$CI_COMMIT_SHORT_SHA"
        paths:
            - html/