1
0
mirror of https://github.com/sebastianbergmann/docker-amiga-gcc.git synced 2025-11-23 02:49:41 +00:00
Files
docker-amiga-gcc-vamos/build.xml

58 lines
2.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="docker-amiga-gcc" default="build">
<!-- Set this to "docker" if you have/want to use Docker instead of Podman -->
<property name="docker-command" value="podman"/>
<property name="test-directory" value="/tmp/docker-amiga-gcc-test"/>
<target name="build">
<exec executable="${docker-command}" taskname="image-build">
<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="${test-directory}"/>
<copy file="${basedir}/test/hello.c" todir="${test-directory}"/>
<exec executable="${docker-command}" 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="${docker-command}" 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>