.gitlab-ci.yml 4.35 KB
Newer Older
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
1
2
3
cache:
    paths:
        - .gradle/
4
        - gradle-5.4.1/
5
        - gradle-5.6.4/
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
6
7
8
9
        - gradle/
        - gradlew

.build-all-base:
10
    image: registry.videolan.org/vlc-debian-android:20200311171937
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
11
    tags:
12
        - amd64
13
        - docker
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
14
15
    stage: build
    script:
Geoffrey Métais's avatar
Geoffrey Métais committed
16
        - ./buildsystem/compile.sh ${EXTRA_BUILD_PARAM} -a ${ARCH}
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
17
18
19
20
21
22
23
24
    variables:
        MAKEFLAGS: -j8

# Rebuilds libvlc JNI
.build-libvlc-base:
    extends: .build-all-base
    only:
        refs:
25
            - master@videolan/vlc-android
26
            - merge_requests
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
27
        changes:
28
29
            # For build script, we rely on the .build-ml-base config
            # which will also build libvlc
30
            - libvlc/**/*
31
32
    except:
        - schedules
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
33
34
35
36
37
38
39
40
41
    variables:
        EXTRA_BUILD_PARAM: -l

# rebuild the medialibrary JNI component
# This implies rebuilding VLC beforehand
.build-ml-base:
    extends: .build-all-base
    only:
        refs:
42
            - master@videolan/vlc-android
43
            - merge_requests
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
44
        changes:
45
            - medialibrary/**/*
Geoffrey Métais's avatar
Geoffrey Métais committed
46
            - buildsystem/**/*
47
48
    except:
        - schedules
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
49
50
51
52
53
54
55
    variables:
        EXTRA_BUILD_PARAM: -ml

# vlc-android app only: don't rebuild everything but use a published artifact
continuous-app-build:
    extends: .build-all-base
    script:
Geoffrey Métais's avatar
Geoffrey Métais committed
56
        - ./buildsystem/compile.sh --init
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
57
58
        - ./gradlew assembleDebug
    only:
59
        refs:
60
            - master@videolan/vlc-android
61
            - merge_requests
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
62
        changes:
63
64
            - "**/*"
            - buildsystem/gitlab/.gitlab-ci.yml
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
65
    except:
66
67
68
        refs:
            - schedules
        changes:
69
            - buildsystem/*
70
71
            - libvlc/**/*
            - medialibrary/**/*
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

#################################
# Template config instantiation #
#################################

build-libvlc-arm64:
    extends: .build-libvlc-base
    variables:
        ARCH: arm64

build-libvlc-armv7:
    extends: .build-libvlc-base
    variables:
        ARCH: arm

build-libvlc-x86:
    extends: .build-libvlc-base
    variables:
        ARCH: x86

build-libvlc-x86_64:
    extends: .build-libvlc-base
    variables:
        ARCH: x86_64

build-ml-arm64:
    extends: .build-ml-base
    variables:
        ARCH: arm64

build-ml-armv7:
    extends: .build-ml-base
    variables:
        ARCH: arm

build-ml-x86:
    extends: .build-ml-base
    variables:
        ARCH: x86

build-ml-x86_64:
    extends: .build-ml-base
    variables:
        ARCH: x86_64

# Nightly builds: build native & app code, and ship the APK as artifact
nightly-arm64:
    extends: .build-all-base
    only: 
        - schedules
    variables:
        ARCH: arm64
    artifacts:
        paths:
126
            - application/app/build/outputs/apk/dev/VLC-Android-*.apk
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
127
128
129
130
131
132
133
134
135
136
        expire_in: 2 weeks

nightly-armv7:
    extends: .build-all-base
    only: 
        - schedules
    variables:
        ARCH: arm
    artifacts:
        paths:
137
            - application/app/build/outputs/apk/dev/VLC-Android-*.apk
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
138
139
140
141
142
143
144
145
146
147
        expire_in: 2 weeks

nightly-x86:
    extends: .build-all-base
    only: 
        - schedules
    variables:
        ARCH: x86
    artifacts:
        paths:
148
            - application/app/build/outputs/apk/dev/VLC-Android-*.apk
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
149
150
151
152
153
154
155
156
157
158
        expire_in: 2 weeks

nightly-x86_64:
    extends: .build-all-base
    only: 
        - schedules
    variables:
        ARCH: x86_64
    artifacts:
        paths:
159
            - application/app/build/outputs/apk/dev/VLC-Android-*.apk
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
160
161
        expire_in: 2 weeks

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
publish_libs:
    extends: .build-all-base
    only:
        - /^libvlc-.*$/
    except:
        - branches
    variables:
        ARCH: all
    script:
        - ./buildsystem/compile.sh -l -a ${ARCH} release
        - GRADLE_ABI=ALL ./gradlew -p libvlc bintrayupload
        - ./buildsystem/compile.sh -ml -a ${ARCH} release
        - GRADLE_ABI=ALL ./gradlew -p medialibrary bintrayupload
    artifacts:
        name: "${CI_COMMIT_TAG}.dbg"
        paths:
            - .dbg/
        expire_in: 2 weeks

release:
    extends: .build-all-base
    only:
        - /^(\d+\.)?(\d+\.)?(\*|\d+)$/
    except:
        - branches
    script:
188
        - ./buildsystem/compile.sh --init
189
190
191
192
193
194
195
196
        - ./gradlew assembleRelease
    artifacts:
        name: "${CI_COMMIT_TAG}"
        paths:
            - application/app/build/outputs/apk/release/VLC-Android-*.apk
#            - application/app/build/outputs/mapping/release/mapping.txt
        expire_in: 2 weeks