<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 22, 2018 at 11:36 PM Arun Raghavan <<a href="mailto:arun@arunraghavan.net">arun@arunraghavan.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This adds a Dockerfile to generate a Docker image with the required<br>
dependencies on top of the standard Ubuntu 18.04 image. The Gitlab CI<br>
then runs the PulseAudio build within this image.<br>
---<br>
.gitlab-ci.yml | 19 +++++++++++++++++<br>
scripts/Dockerfile | 53 ++++++++++++++++++++++++++++++++++++++++++++++<br>
2 files changed, 72 insertions(+)<br>
create mode 100644 .gitlab-ci.yml<br>
create mode 100644 scripts/Dockerfile<br>
<br>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml<br>
new file mode 100644<br>
index 000000000..e9c983075<br>
--- /dev/null<br>
+++ b/.gitlab-ci.yml<br>
@@ -0,0 +1,19 @@<br>
+image: <a href="http://registry.freedesktop.org/pulseaudio/pulseaudio/ubuntu:18.04" rel="noreferrer" target="_blank">registry.freedesktop.org/pulseaudio/pulseaudio/ubuntu:18.04</a><br>
+<br>
+build:<br>
+ stage: build<br>
+ script:<br>
+ - export MAKEFLAGS="-j4"<br></blockquote><div><br></div><div>This seems to be inappropriate for a CI build. How do you know the available cores in the runner? I would expect to have at most MAKEFLAGS=$(nproc)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ - NOCONFIGURE=1 ./bootstrap.sh<br>
+ - mkdir build<br>
+ - cd build<br>
+ - ../configure --localstatedir=/var<br></blockquote><div><br></div><div>I think for CI builds options should be explicitly selected, and have the build fail if any of the expected options cannot be enabled. This may help catch some <a href="http://configure.ac/Makefile.am">configure.ac/Makefile.am</a> bugs.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ - make<br>
+ - make check<br>
+ - make check-daemon<br>
+ - make distcheck<br></blockquote><div><br></div><div>This effectively runs make and make check again. I think it would be better to split this to a separate job so it can run in parallel.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ - make install DESTDIR=`mktemp -d`<br>
+ - make dist<br>
+ artifacts:<br>
+ paths:<br>
+ - build/<br>
diff --git a/scripts/Dockerfile b/scripts/Dockerfile<br>
new file mode 100644<br>
index 000000000..ed7063212<br>
--- /dev/null<br>
+++ b/scripts/Dockerfile<br>
@@ -0,0 +1,53 @@<br>
+# Start with current Ubuntu LTS<br>
+FROM ubuntu:18.04<br>
+<br>
+# Add a PulseAudio's dependencies<br>
+RUN apt-get update && apt-get install -y \<br>
+ autoconf \<br>
+ automake \<br>
+ autopoint \<br>
+ bash-completion \<br>
+ check \<br>
+ dbus-x11 \<br>
+ g++ \<br>
+ gcc \<br></blockquote><div><br></div><div>build-essential should get you a basic build system in place. Otherwise, you need to add make to the list (make might stop being a transitive dependency in the future).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ gettext \<br></blockquote><div><br></div><div>Isn't intltool necessary too?(If not I could drop that from the debian package)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ git-core \<br>
+ libasound2-dev \<br>
+ libasyncns-dev \<br>
+ libatomic-ops-dev \<br></blockquote><div><br></div><div>This is not necessary because gcc has atomic builtins.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ libavahi-client-dev \<br>
+ libbluetooth-dev \<br>
+ libcap-dev \<br>
+ libfftw3-dev \<br>
+ libglib2.0-dev \<br>
+ libgtk-3-dev \<br>
+ libice-dev \<br>
+ libjack-dev \<br>
+ liblircclient-dev \<br>
+ libltdl-dev \<br>
+ liborc-0.4-dev \<br>
+ libsbc-dev \<br>
+ libsndfile1-dev \<br>
+ libsoxr-dev \<br>
+ libspeexdsp-dev \<br>
+ libssl-dev \<br>
+ libtdb-dev \<br>
+ libudev-dev \<br>
+ libwebrtc-audio-processing-dev \<br>
+ libwrap0-dev \<br>
+ libx11-xcb-dev \<br>
+ libxcb1-dev \<br>
+ libxml-parser-perl \<br>
+ libxtst-dev \<br>
+ systemd<br></blockquote><div><br></div><div>libsystemd-dev is missing.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+# Add a user and set as default for the build. This is safer, in general, and<br>
+# allows us to avoid having to explicitly allow running as root in the<br>
+# check-daemon stage.<br>
+RUN groupadd -g 1000 a_group && \<br>
+ useradd a_user -u 1000 -g a_group -m<br></blockquote><div><br></div><div>Ubuntu has adduser that creates both user and group at the same time.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+USER a_user:a_group<br>
+<br>
+# And make sure subsequent commands are run in the user's home directory<br>
+WORKDIR /home/a_user<br>
-- <br>
2.17.1<br></blockquote><div><br></div><div>Saludos </div></div></div>