-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
.gitlab-ci.yml
176 lines (154 loc) · 5.8 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
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-darwin23-cc'" >> cross.txt
- echo "cpp = 'x86_64-apple-darwin23-c '" >> cross.txt
- echo "ar = 'x86_64-apple-darwin23-ar'" >> cross.txt
- echo "strip = 'x86_64-apple-darwin23-strip'" >> cross.txt
- echo "pkgconfig = 'x86_64-apple-darwin23-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-x86_64/OBS.app/Contents/Frameworks
- meson --buildtype release --cross-file cross.txt macos
- ninja -C macos
- mkdir -p macos/obs-gstreamer.plugin/Contents/MacOS
- mv macos/obs-gstreamer.so macos/obs-gstreamer.plugin/Contents/MacOS/obs-gstreamer
- echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo "<"'!'"DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo "<plist version=\"1.0\">" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo "<dict>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo " <key>CFBundleExecutable</key>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo " <string>obs-gstreamer</string>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo "</dict>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
- echo "</plist>" >> macos/obs-gstreamer.plugin/Contents/Info.plist
artifacts:
paths:
- macos/obs-gstreamer.plugin
expire_in: 1 day
.macos-aarch64:
stage: build
image: registry.gitlab.com/fzwoch/obs-gstreamer/macos
script:
- echo "[binaries]" >> cross.txt
- echo "c = 'aarch64-apple-darwin20.2-cc'" >> cross.txt
- echo "cpp = 'aarch64-apple-darwin20.2-c '" >> cross.txt
- echo "ar = 'aarch64-apple-darwin20.2-ar'" >> cross.txt
- echo "strip = 'aarch64-apple-darwin20.2-strip'" >> cross.txt
- echo "pkgconfig = 'aarch64-apple-darwin20.2-pkg-config'" >> cross.txt
- echo "[host_machine]" >> cross.txt
- echo "system = 'darwin'" >> cross.txt
- echo "cpu_family = 'aarch64'" >> cross.txt
- echo "cpu = 'aarch64'" >> cross.txt
- echo "endian = 'little'" >> cross.txt
- export C_INCLUDE_PATH=/
- export LIBRARY_PATH=/OBS-x86_64/OBS.app/Contents/Frameworks
- meson --buildtype release --cross-file cross.txt macos-aarch64
- ninja -C macos-aarch64
artifacts:
paths:
- macos-aarch64/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 "pkg_config_libdir = '/c/gstreamer/1.0/mingw_x86_64/lib/pkgconfig'" >> 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.plugin
- windows/obs-gstreamer.dll