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