docker-amiga-gcc-vamos/build.xml

56 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="docker-amiga-gcc" default="build">
<target name="clean">
<delete dir="${basedir}/test"/>
</target>
<target name="build">
<exec executable="docker" taskname="docker">
<arg value="build"/>
<arg value="--pull"/>
<arg value="--no-cache"/>
<arg value="--tag"/>
<arg value="sebastianbergmann/amiga-gcc:latest"/>
<arg path="${basedir}"/>
</exec>
</target>
<target name="test">
<mkdir dir="${basedir}/test"/>
<exec executable="docker" taskname="docker">
<arg value="run"/>
<arg value="--rm"/>
<arg value="--volume"/>
<arg value="${basedir}/test:/host"/>
<arg value="sebastianbergmann/amiga-gcc:latest"/>
<arg value="m68k-amigaos-gcc"/>
<arg value="/host/hello.c"/>
<arg value="-o"/>
<arg value="/host/hello"/>
<arg value="-noixemul"/>
</exec>
<exec executable="docker" taskname="docker" outputproperty="hello.c">
<arg value="run"/>
<arg value="--rm"/>
<arg value="--volume"/>
<arg value="${basedir}/test:/host"/>
<arg value="sebastianbergmann/amitools:latest"/>
<arg value="vamos"/>
<arg value="/host/hello"/>
</exec>
<fail message="hello.c could not be compiled and executed">
<condition>
<not>
<equals arg1="${hello.c}" arg2="Hello world!"/>
</not>
</condition>
</fail>
<delete file="${basedir}/test/hello"/>
</target>
</project>