From: Guido Draheim Date: Mon, 13 Apr 2020 13:34:14 +0000 (+0200) Subject: add ubuntu18-build.dockerfile X-Git-Tag: v0.13.71~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=badeacec1c7ae1f86d30bd4540889077bd06736a;p=zziplib add ubuntu18-build.dockerfile --- diff --git a/testbuilds.py b/testbuilds.py index e7b2ff4..3d9ddaf 100755 --- a/testbuilds.py +++ b/testbuilds.py @@ -409,6 +409,48 @@ class ZZiplibBuildTest(unittest.TestCase): cmd = "docker rmi {images}:{testname}" sx____(cmd.format(**locals())) self.rm_testdir() + def test_212_centos8_build_dockerfile(self): + if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") + testname=self.testname() + testdir = self.testdir() + dockerfile="testbuilds/centos8-build.dockerfile" + addhosts = self.local_addhosts(dockerfile) + savename = docname(dockerfile) + saveto = SAVETO + images = IMAGES + cmd = "docker build . -f {dockerfile} {addhosts} --tag {images}:{testname}" + sh____(cmd.format(**locals())) + cmd = "docker rm --force {testname}" + sx____(cmd.format(**locals())) + # + cmd = "docker rmi {saveto}/{savename}:latest" + sx____(cmd.format(**locals())) + cmd = "docker tag {images}:{testname} {saveto}/{savename}:latest" + sh____(cmd.format(**locals())) + cmd = "docker rmi {images}:{testname}" + sx____(cmd.format(**locals())) + self.rm_testdir() + def test_222_ubuntu18_build_dockerfile(self): + if not os.path.exists(DOCKER_SOCKET): self.skipTest("docker-based test") + testname=self.testname() + testdir = self.testdir() + dockerfile="testbuilds/ubuntu18-build.dockerfile" + addhosts = self.local_addhosts(dockerfile) + savename = docname(dockerfile) + saveto = SAVETO + images = IMAGES + cmd = "docker build . -f {dockerfile} {addhosts} --tag {images}:{testname}" + sh____(cmd.format(**locals())) + cmd = "docker rm --force {testname}" + sx____(cmd.format(**locals())) + # + cmd = "docker rmi {saveto}/{savename}:latest" + sx____(cmd.format(**locals())) + cmd = "docker tag {images}:{testname} {saveto}/{savename}:latest" + sh____(cmd.format(**locals())) + cmd = "docker rmi {images}:{testname}" + sx____(cmd.format(**locals())) + self.rm_testdir() if __name__ == "__main__": diff --git a/testbuilds/ubuntu18-build.dockerfile b/testbuilds/ubuntu18-build.dockerfile new file mode 100644 index 0000000..cfbdf35 --- /dev/null +++ b/testbuilds/ubuntu18-build.dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:18.04 + +RUN apt-get update +RUN apt-get install -y gcc zlib1g-dev python3 cmake unzip zip gzip tar + +RUN mkdir src +COPY CMakeLists.txt README COPYING.LIB ChangeLog src/ +COPY bins src/bins +COPY docs src/docs +COPY test src/test +copy SDL src/SDL +copy zzipwrap src/zzipwrap +copy zzip src/zzip + +RUN mkdir src/build +RUN cd src/build && cmake .. +RUN cd src/build && make +RUN cd src/build && make check