55 lines
1.8 KiB
XML
55 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="docker-amiga-gcc" default="build">
|
|
<property name="test-directory" value="/tmp/docker-amiga-gcc-test"/>
|
|
|
|
<target name="build">
|
|
<exec executable="buildah" taskname="image-build">
|
|
<arg value="build"/>
|
|
<arg value="--no-cache"/>
|
|
<arg value="--squash"/>
|
|
<arg value="--tag"/>
|
|
<arg value="sebastianbergmann/amiga-gcc"/>
|
|
<arg path="${basedir}/Containerfile"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="test">
|
|
<mkdir dir="${test-directory}"/>
|
|
<copy file="${basedir}/test/hello.c" todir="${test-directory}"/>
|
|
|
|
<exec executable="podman" taskname="test-compile">
|
|
<arg value="run"/>
|
|
<arg value="--rm"/>
|
|
<arg value="--volume"/>
|
|
<arg value="${test-directory}:/host:Z"/>
|
|
<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="podman" taskname="test-execute" outputproperty="hello.c">
|
|
<arg value="run"/>
|
|
<arg value="--rm"/>
|
|
<arg value="--volume"/>
|
|
<arg value="${test-directory}:/host:Z"/>
|
|
<arg value="sebastianbergmann/amitools:latest"/>
|
|
<arg value="vamos"/>
|
|
<arg value="/host/hello"/>
|
|
</exec>
|
|
|
|
<delete dir="${test-directory}"/>
|
|
|
|
<fail message="hello.c could not be compiled and executed">
|
|
<condition>
|
|
<not>
|
|
<equals arg1="${hello.c}" arg2="Hello world!"/>
|
|
</not>
|
|
</condition>
|
|
</fail>
|
|
</target>
|
|
</project>
|
|
|