<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>