forked from fzwoch/obs-gstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
117 lines (99 loc) · 3.09 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
stages:
- docker
- build
- deploy
.docker:template: &docker
stage: docker
image: docker:git
services:
- name: docker:dind
script:
- export PLATFORM=`echo $CI_JOB_NAME | cut -d':' -f2`
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -f docker/$PLATFORM -t registry.gitlab.com/fzwoch/obs-gstreamer/$PLATFORM .
- docker push registry.gitlab.com/fzwoch/obs-gstreamer/$PLATFORM
only:
refs:
- master
changes:
- docker/$PLATFORM
docker:linux:
<<: *docker
docker:macos:
<<: *docker
docker:mingw:
<<: *docker
linux:
stage: build
image: registry.gitlab.com/fzwoch/obs-gstreamer/linux
script:
- export LD_FLAGS=-static-libgcc
- meson --buildtype release linux
- ninja -C linux
artifacts:
paths:
- linux/gstreamer.so
expire_in: 1 day
macos:
stage: build
image: registry.gitlab.com/fzwoch/obs-gstreamer/macos
script:
- echo "[binaries]" >> cross.txt
- echo "c = 'x86_64-apple-darwin15-cc'" >> cross.txt
- echo "cpp = 'x86_64-apple-darwin15-c++'" >> cross.txt
- echo "ar = 'x86_64-apple-darwin15-ar'" >> cross.txt
- echo "strip = 'x86_64-apple-darwin15-strip'" >> cross.txt
- echo "pkgconfig = 'x86_64-apple-darwin15-pkg-config'" >> cross.txt
- echo "[host_machine]" >> cross.txt
- echo "system = 'darwin'" >> cross.txt
- echo "cpu_family = 'x86_64'" >> cross.txt
- echo "cpu = 'x86_64'" >> cross.txt
- echo "endian = 'little'" >> cross.txt
- export C_INCLUDE_PATH=/
- export LIBRARY_PATH=/Applications/OBS.app/Contents/Resources/bin
- meson --buildtype release --cross-file cross.txt macos
- ninja -C macos
- mv macos/gstreamer.dylib macos/gstreamer.so
artifacts:
paths:
- macos/gstreamer.so
expire_in: 1 day
windows:
stage: build
image: registry.gitlab.com/fzwoch/obs-gstreamer/mingw
script:
- export PKG_CONFIG_PATH=/c/gstreamer/1.0/x86_64/lib/pkgconfig/
- echo "[binaries]" >> cross.txt
- echo "c = 'x86_64-w64-mingw32-gcc'" >> cross.txt
- echo "cpp = 'x86_64-w64-mingw32-g++'" >> cross.txt
- echo "ar = 'x86_64-w64-mingw32-ar'" >> cross.txt
- echo "strip = 'x86_64-w64-mingw32-strip'" >> cross.txt
- echo "pkgconfig = 'x86_64-w64-mingw32-pkg-config'" >> cross.txt
- echo "windres = 'x86_64-w64-mingw32-windres'" >> cross.txt
- echo "[properties]" >> cross.txt
- echo "c_link_args = ['-static-libgcc', '-L/bin/64bit']" >> cross.txt
- echo "[host_machine]" >> cross.txt
- echo "system = 'windows'" >> cross.txt
- echo "cpu_family = 'x86_64'" >> cross.txt
- echo "cpu = 'x86_64'" >> cross.txt
- echo "endian = 'little'" >> cross.txt
- export C_INCLUDE_PATH=/
- meson --buildtype release --cross-file cross.txt windows
- ninja -C windows
artifacts:
paths:
- windows/gstreamer.dll
expire_in: 1 day
obs-gstreamer:
stage: deploy
image: debian:buster
variables:
GIT_STRATEGY: none
script:
- echo Done
artifacts:
name: obs-gstreamer
paths:
- linux/gstreamer.so
- macos/gstreamer.so
- windows/gstreamer.dll