Add testing Dockerfiles for automated testing
authorJonathan Dieter <jdieter@gmail.com>
Tue, 17 Jul 2018 14:49:14 +0000 (15:49 +0100)
committerJonathan Dieter <jdieter@gmail.com>
Tue, 17 Jul 2018 14:49:14 +0000 (15:49 +0100)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
DOCKER_TESTING.md [new file with mode: 0644]
autotest/centos-latest/Dockerfile [new file with mode: 0644]
autotest/centos-latest/docker-compose.yml [new file with mode: 0644]
autotest/debian-latest/Dockerfile [new file with mode: 0644]
autotest/debian-latest/docker-compose.yml [new file with mode: 0644]
autotest/fedora-latest/Dockerfile [new file with mode: 0644]
autotest/fedora-latest/docker-compose.yml [new file with mode: 0644]
autotest/opensuse-leap/Dockerfile [new file with mode: 0644]
autotest/opensuse-leap/docker-compose.yml [new file with mode: 0644]
autotest/ubuntu-rolling/Dockerfile [new file with mode: 0644]
autotest/ubuntu-rolling/docker-compose.yml [new file with mode: 0644]

diff --git a/DOCKER_TESTING.md b/DOCKER_TESTING.md
new file mode 100644 (file)
index 0000000..ec2a6a4
--- /dev/null
@@ -0,0 +1,10 @@
+Dockerfiles are available to test the latest build on different platforms:
+
+ * fedora:latest - autotest/fedora-latest
+ * centos:latest - autotest/centos-latest
+ * ubuntu:rolling - autotest/ubuntu-rolling
+ * opensuse/leap - autotest/opensuse-leap
+ * debian:latest - autotest/debian-latest
+
+To test, in the project root directory, run:<br>
+```docker-compose --file autotest/<platform directory>/docker-compose.yml build```
\ No newline at end of file
diff --git a/autotest/centos-latest/Dockerfile b/autotest/centos-latest/Dockerfile
new file mode 100644 (file)
index 0000000..16ce7d0
--- /dev/null
@@ -0,0 +1,9 @@
+FROM centos:latest
+ADD ./ /code
+WORKDIR /code
+RUN yum -y install epel-release
+RUN yum -y update epel-release
+RUN yum -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)"
+RUN meson build
+RUN /bin/bash -c 'cd build; ninja-build'
+RUN /bin/bash -c 'cd build; ninja-build test'
diff --git a/autotest/centos-latest/docker-compose.yml b/autotest/centos-latest/docker-compose.yml
new file mode 100644 (file)
index 0000000..712ca1d
--- /dev/null
@@ -0,0 +1,6 @@
+version: '3'
+services:
+  test:
+    build:
+      context: ../../
+      dockerfile: ./autotest/centos-latest/Dockerfile
diff --git a/autotest/debian-latest/Dockerfile b/autotest/debian-latest/Dockerfile
new file mode 100644 (file)
index 0000000..350d349
--- /dev/null
@@ -0,0 +1,8 @@
+FROM debian:latest
+ADD ./ /code
+WORKDIR /code
+RUN apt-get update
+RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -yq install meson gcc pkg-config libzstd-dev libcurl4-openssl-dev libssl-dev'
+RUN meson build
+RUN /bin/bash -c 'cd build; ninja'
+RUN /bin/bash -c 'cd build; ninja test'
diff --git a/autotest/debian-latest/docker-compose.yml b/autotest/debian-latest/docker-compose.yml
new file mode 100644 (file)
index 0000000..d43de16
--- /dev/null
@@ -0,0 +1,6 @@
+version: '3'
+services:
+  test:
+    build:
+      context: ../../
+      dockerfile: ./autotest/debian-latest/Dockerfile
diff --git a/autotest/fedora-latest/Dockerfile b/autotest/fedora-latest/Dockerfile
new file mode 100644 (file)
index 0000000..c81680c
--- /dev/null
@@ -0,0 +1,7 @@
+FROM fedora:latest
+ADD ./ /code
+WORKDIR /code
+RUN dnf -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)"
+RUN meson build
+RUN /bin/bash -c 'cd build; ninja'
+RUN /bin/bash -c 'cd build; ninja test'
diff --git a/autotest/fedora-latest/docker-compose.yml b/autotest/fedora-latest/docker-compose.yml
new file mode 100644 (file)
index 0000000..7069e3d
--- /dev/null
@@ -0,0 +1,6 @@
+version: '3'
+services:
+  test:
+    build:
+      context: ../../
+      dockerfile: ./autotest/fedora-latest/Dockerfile
diff --git a/autotest/opensuse-leap/Dockerfile b/autotest/opensuse-leap/Dockerfile
new file mode 100644 (file)
index 0000000..ea6d3f0
--- /dev/null
@@ -0,0 +1,7 @@
+FROM opensuse/leap
+ADD ./ /code
+WORKDIR /code
+RUN zypper --non-interactive install meson gcc pkgconfig "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)"
+RUN meson build
+RUN /bin/bash -c 'cd build; ninja'
+RUN /bin/bash -c 'cd build; ninja test'
diff --git a/autotest/opensuse-leap/docker-compose.yml b/autotest/opensuse-leap/docker-compose.yml
new file mode 100644 (file)
index 0000000..f305465
--- /dev/null
@@ -0,0 +1,6 @@
+version: '3'
+services:
+  test:
+    build:
+      context: ../../
+      dockerfile: ./autotest/opensuse-leap/Dockerfile
diff --git a/autotest/ubuntu-rolling/Dockerfile b/autotest/ubuntu-rolling/Dockerfile
new file mode 100644 (file)
index 0000000..4b62c58
--- /dev/null
@@ -0,0 +1,8 @@
+FROM ubuntu:rolling
+ADD ./ /code
+WORKDIR /code
+RUN apt-get update
+RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -yq install meson gcc pkg-config libzstd-dev libcurl4-openssl-dev libssl-dev'
+RUN meson build
+RUN /bin/bash -c 'cd build; ninja'
+RUN /bin/bash -c 'cd build; ninja test'
diff --git a/autotest/ubuntu-rolling/docker-compose.yml b/autotest/ubuntu-rolling/docker-compose.yml
new file mode 100644 (file)
index 0000000..a35dd2d
--- /dev/null
@@ -0,0 +1,6 @@
+version: '3'
+services:
+  test:
+    build:
+      context: ../../
+      dockerfile: ./autotest/ubuntu-rolling/Dockerfile