forked from fzwoch/obs-gstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
138 lines (121 loc) · 3.9 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
stages:
- docker
- build
- deploy
docker-linux:
stage: docker
image: docker:git
services:
- name: docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -f docker/linux -t registry.gitlab.com/fzwoch/obs-gstreamer/linux .
- docker push registry.gitlab.com/fzwoch/obs-gstreamer/linux
rules:
- if: $CI_COMMIT_BRANCH == "master"
changes:
- docker/linux
when: always
docker-macos:
stage: docker
image: docker:git
services:
- name: docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -f docker/macos -t registry.gitlab.com/fzwoch/obs-gstreamer/macos .
- docker push registry.gitlab.com/fzwoch/obs-gstreamer/macos
rules:
- if: $CI_COMMIT_BRANCH == "master"
changes:
- docker/macos
when: always
docker-mingw:
stage: docker
image: docker:git
services:
- name: docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -f docker/mingw -t registry.gitlab.com/fzwoch/obs-gstreamer/mingw .
- docker push registry.gitlab.com/fzwoch/obs-gstreamer/mingw
rules:
- if: $CI_COMMIT_BRANCH == "master"
changes:
- docker/mingw
when: always
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/obs-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-darwin18-cc'" >> cross.txt
- echo "cpp = 'x86_64-apple-darwin18-c++'" >> cross.txt
- echo "ar = 'x86_64-apple-darwin18-ar'" >> cross.txt
- echo "strip = 'x86_64-apple-darwin18-strip'" >> cross.txt
- echo "pkgconfig = 'x86_64-apple-darwin18-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=/OBS/OBS.app/Contents/Frameworks
- meson --buildtype release --cross-file cross.txt macos
- ninja -C macos
- mv macos/obs-gstreamer.dylib macos/obs-gstreamer.so
artifacts:
paths:
- macos/obs-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 -Dpkg_config_path=/c/gstreamer/1.0/x86_64/lib/pkgconfig/ windows
- ln -s /c/ "windows/c:"
- ninja -C windows
artifacts:
paths:
- windows/obs-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/obs-gstreamer.so
- macos/obs-gstreamer.so
- windows/obs-gstreamer.dll