This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.xml
54 lines (47 loc) · 1.8 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?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>