Commit Graph

42 Commits

Author SHA1 Message Date
Jean-Christophe Fillion-Robin
606d0b3ed9
Makefile: Make sure BIN directory exist when running any test
This commit allows to run any test directly after checking out
the source code.
2016-09-26 00:21:16 -04:00
Jean-Christophe Fillion-Robin
8a4e0845da
Makefile: All images are tested. Remove ALL_IMAGES and DEFAULT_IMAGES vars.
To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after has been compared.

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff --ignore-trailing-space ../dockcross-$target-baseline ../dockcross-$target-current> /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "-------------------------------" && \
    echo "Here is output of:" && \
    echo "  diff --ignore-trailing-space ../dockcross-$target-baseline ../dockcross-$target-current" && \
    echo "" && \
    diff --ignore-trailing-space ../dockcross-$target-baseline ../dockcross-$target-current
done
```

Output:

```
-------------------------------
Here is output of:
  diff --ignore-trailing-space ../dockcross-make-baseline ../dockcross-make-current

8a9
> docker build -t dockcross/linux-ppc64le linux-ppc64le
10a12,14
> cp -r test browser-asmjs/
> docker build -t dockcross/browser-asmjs browser-asmjs
> rm -rf browser-asmjs/test

-------------------------------
Here is output of:
  diff --ignore-trailing-space ../dockcross-make-test-baseline ../dockcross-make-test-current

24a25,27
> docker build -t dockcross/linux-ppc64le linux-ppc64le
> docker run --rm dockcross/linux-ppc64le > bin/dockcross-linux-ppc64le && chmod +x bin/dockcross-linux-ppc64le
> bin/dockcross-linux-ppc64le python test/run.py --languages C
30a34,38
> cp -r test browser-asmjs/
> docker build -t dockcross/browser-asmjs browser-asmjs
> rm -rf browser-asmjs/test
> docker run --rm dockcross/browser-asmjs > bin/dockcross-browser-asmjs && chmod +x bin/dockcross-browser-asmjs
> bin/dockcross-browser-asmjs python test/run.py --exe-suffix ".js"

```
2016-09-25 23:28:23 -04:00
Jean-Christophe Fillion-Robin
aa4735ddf2
Makefile: Add "display_default_images" and "display_all_images" targets 2016-09-25 19:46:49 -04:00
Jean-Christophe Fillion-Robin
4a0c6442c2
Makefile: Introduce NON_STANDARD_IMAGES, ALL_IMAGES and DEFAULT_IMAGES vars
This commit also ensures that:
* all image targets are declared as PHONY
* "test" and not "tests" is declared as PHONY


To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared.


Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
make browser-asmjs.test --dry-run > ../dockcross-make-browser-asmjs-test-baseline
make linux-ppc64le.test --dry-run > ../dockcross-make-linux-ppc64le-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current
make browser-asmjs.test --dry-run > ../dockcross-make-browser-asmjs-test-current
make linux-ppc64le.test --dry-run > ../dockcross-make-linux-ppc64le-test-current

for target in make make-test make-browser-asmjs-test make-linux-ppc64le-test; do
  diff --ignore-trailing-space ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 19:04:07 -04:00
Jean-Christophe Fillion-Robin
b033376284
Makefile: Add comments and move implicit rules at the end of the file
To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff --ignore-trailing-space ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 18:38:26 -04:00
Jean-Christophe Fillion-Robin
0710c46745
Makefile: Treat windows-(x86|x64) as regular image introducing _ARGS var
To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared.

The only difference was due to the extra space in the command line
associated with windows-x86

```
< bin/dockcross-windows-x86 python test/run.py  --exe-suffix ".exe"
---
> bin/dockcross-windows-x86 python test/run.py --exe-suffix ".exe"
```


Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff --ignore-trailing-space ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 18:20:02 -04:00
Jean-Christophe Fillion-Robin
f7f6989e46
Makefile: Add implicit rule for STANDARD_TESTS
To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 18:03:28 -04:00
Jean-Christophe Fillion-Robin
53b158314a
Makefile: Add implicit rule for STANDARD_IMAGES
Adding a new images with the usual build rule:

  $(DOCKER) build -t $(ORG)/$@ $@

is now just a matter of adding an item to the "STANDARD_IMAGES" list.


To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared.

Note that since this patch changes the order in which the images are
listed (manylinux is now last), the baseline and current files are
different. After inspection, we can confirm the difference is explained
by the order of the commands.

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 17:44:08 -04:00
Jean-Christophe Fillion-Robin
2a12475d36
Makefile: Remove dependencies on a non-generated files
Since image targets are all "phony", they are always consider out-of-date
and will always be rebuilt. This means there is no need to add an explicit
dependency on non-generated files like  "Dockerfile", "settings.mk" and
"test/run.py".

The only required dependencies on Dockerfile are the one for the "base"
and "manylinux" images.

To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 17:38:20 -04:00
Jean-Christophe Fillion-Robin
caba0b0cef
Makefile: Remove "Toolchain.cmake" dependencies
Since image targets are all "phony", they are always consider out-of-date
and will always be rebuilt. This means there is no need to add an explicit
dependency on the "Toolchain.cmake" file.

Note also that the dependency on "Toolchain.cmake" was not consistent
for all images. For example, "linux-x64" was missing the dependency
whereas it was specified for "linux-x86".

This commit ensure all image targets are consistent removing the
dependency on "Toolchain.cmake".

To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 17:38:12 -04:00
Jean-Christophe Fillion-Robin
e428bb3c03
Makefile: Simplify test rule using "addsuffix" filename function
See https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html#File-Name-Functions

To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 17:38:05 -04:00
Jean-Christophe Fillion-Robin
92b57f511d
Makefile: Introduce IMAGES variable
To confirm that the Makefiles works as expected after this patch, the
list of executed commands before and after is compared:

Before:

```
make --dry-run > ../dockcross-make-baseline
make test --dry-run > ../dockcross-make-test-baseline
```

After:

```
make --dry-run > ../dockcross-make-current;
make test --dry-run > ../dockcross-make-test-current

for target in make make-test; do
  diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1
  [[ $? == 1 ]] && \
    echo "" && \
    echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match."
done
```
2016-09-25 17:37:08 -04:00
Matt McCormick
1354fe2586 manylinux-x86: Initial addition 2016-09-24 23:14:33 -04:00
Matt McCormick
0bc1f257a6 makefile: Add manylinux-x64 to top level targets 2016-09-21 10:22:31 -04:00
Matt McCormick
b596ca6cd8 base,manylinux-x64: Use sed for Dockerfile composition
Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2016-09-20 18:08:43 -04:00
Matt McCormick
5d90a72dfc manylinux-x64: Initial addition 2016-09-20 18:07:58 -04:00
Matt McCormick
755f45b412 base: Split into Dockerfile.in and common.docker
So common.docker can be re-used in other images that are not built FROM base.
2016-09-20 08:58:41 -04:00
Matt McCormick
e3ecfeb1a6 test: Use 'make test' as the Makefile target
This is a more common name for this target and it helps with tab completion.
2016-07-22 08:49:49 -04:00
Matt McCormick
1ed3548655 base: Add cmake wrapper scripts for CMAKE_TOOLCHAIN_FILE
All images should define this variables.

Disable build tests on the base image because it is not configured for cross
compiling.
2016-07-22 08:48:59 -04:00
Matt McCormick
24c0141bea ci: Fix make *.test invocation 2016-07-16 13:55:04 -04:00
Jean-Christophe Fillion-Robin
3c25505f52 Makefile: Add test targets
This commits add test targets for all images, this will facilitate local
testing.

In addition to the usual targets:

  make android-arm
  make browser-asmjs
  [...]

the following targets are now available:

  make tests
  make android-arm.test
  make browser-asmjs.test
  [...]

Note that the target "all" has been renamed into "images"
2016-07-16 02:45:23 -04:00
Matt McCormick
e1ef4f6194 Makefile: replace default target by all target 2016-07-16 01:27:13 -04:00
Jean-Christophe Fillion-Robin
c237fc9925 Makefile: Add "default" target
This commit adds a target named "default" at the top of the Makefile. Since
make will build the first target by default, simply typing "make" will
build all images.

See http://stackoverflow.com/questions/27242905/makefile-all-vs-default-targets/27243940#27243940

Note: Since "darwin-x64" needs some work, it has been excluded from the
default list.
2016-07-16 01:19:37 -04:00
Jean-Christophe Fillion-Robin
a3b7b03058 Makefile: Fix target linux-x64
There are no linux-x64/Toolchain.cmake file
2016-07-16 01:19:37 -04:00
Matt McCormick
04c7d0de18 Rename project and repository to dockcross 2016-07-15 23:46:08 -04:00
Matt McCormick
a5c84b842f arm64: Initial addition 2016-07-15 17:39:33 -04:00
Matt McCormick
30e29f3bbb browser-asmjs: cp ~/.emscripten, etc to the user home in the entrypoint 2016-07-06 15:33:35 -04:00
Roman Valls Guimera
7e6150cf29 Tidy up and consolidate both README.rst/README.md into one. Introduce linux-armv5. 2016-05-30 22:50:22 +02:00
Matt McCormick
af5c3fecec linux-x86: Update and add testing. 2016-04-06 16:48:12 -04:00
Matt McCormick
6e545319f0 browser-asmjs: Rename from javascript-asmjs.
We are one past the 30-character limit at DockerHub otherwise :-(.
2015-05-19 17:52:43 -04:00
Matt McCormick
60fa7bd4ad javascript-asmjs: Initial addition. 2015-05-19 17:34:05 -04:00
Matt McCormick
bd41c2520e linux-ppc64le: Initial addition based off Debian. 2015-05-18 15:21:41 -04:00
Matt McCormick
f3b2cbb199 android-arm: Update toolchain and provide Toolchain.cmake. 2015-05-16 13:36:10 -04:00
Matt McCormick
5a6db5b9e2 linux-armv6: Add CMake toolchain file. 2015-05-13 14:09:25 -04:00
Matt McCormick
a04f06eecc linux-armv7: Add CMake and GFortran support. 2015-05-09 07:48:53 -04:00
Matt McCormick
f14d99c661 windows-x64: Migrate to MXE. 2015-05-06 00:08:21 -04:00
Matt McCormick
760e5acfa6 The windows-x86 is now from MXE.
See http://mxe.cc
2015-05-04 17:32:58 -04:00
Matt McCormick
70dc9549da Name each image by the cross-compiler target.
Docker tags then can be used for multiple versions per target.
2015-05-04 14:50:16 -04:00
Rob Burns
6fb059b357 consistent tags 2015-02-01 10:48:35 +07:00
Rob Burns
7a5bc6c22d restructure makefile for individual builds, restructure linux-arm dockerfiles 2015-02-01 10:18:38 +07:00
Steeve Morin
b1137b5d3c
Make sure base is properly built
Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2014-11-13 03:33:32 +01:00
Steeve Morin
703053871c
Use base image, add Makefile, compress RUN statements to save on disk space
Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2014-10-17 13:42:56 +02:00