mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
Travis CI and Documentation Generation Improvements
* Use docker images from docker hub instead of building them on Travis * Fix doxygen warnings for Markdown Files * Modify Travis build matrix to include stages and additional jobs * Add doxygen2jsdoc submodule * Add doxyport submodule * Remove duplicated code in doxy/node directory * Generate documentation for each language in Travis Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
@ -139,61 +139,6 @@ Requirements:
|
||||
**NOTE:** docker-compose is an optional requirement. It actually make running complex
|
||||
docker build and run command easier. But you can just use docker to build and run.
|
||||
|
||||
### Docker Images Hierarchy
|
||||
|
||||
To improve build times and images sizes, upm use a build hierarchy to incrementally
|
||||
create a build environment. Find below a brief description of them:
|
||||
|
||||
1. **upm-base:** Provides the basic infrastructure and tools to compile C/C++ code and documentation.
|
||||
2. **upm-python:** Provides the python2/python3 build tools. Depends on `upm-base`.
|
||||
3. **upm-java:** Provides the Java build tools. Depends on `upm-base`.
|
||||
4. **upm-android:** Provides the Android Things build tools. Depends on `upm-java`.
|
||||
5. **upm-node4:** Provides the Node.js v4.4.7 build tools. Depends on `upm-base`.
|
||||
6. **upm-node5:** Same as `upm-node4`, but using Node.js v5.12.0.
|
||||
7. **upm-node6:** Same as `upm-node4`, but using Node.js v6.11.0.
|
||||
|
||||
**NOTE:** If you want to know which tools are installed for each of the upm targets,
|
||||
just take a look at the `docker/` folder. All the related Dockerfiles are stored there!
|
||||
|
||||
### Building Docker Images
|
||||
|
||||
**tl;dr:** Just use this commands to build the hierarchy:
|
||||
|
||||
```sh
|
||||
# Build the base image
|
||||
$ docker-compose build base
|
||||
# Build python image
|
||||
$ docker-compose build python
|
||||
# Build java image
|
||||
$ docker-compose build java
|
||||
# Build node4 image
|
||||
$ docker-compose build node4
|
||||
# Build node5 image
|
||||
$ docker-compose build node5
|
||||
# Build node6 image
|
||||
$ docker-compose build node6
|
||||
# Build android things image
|
||||
$ docker-compose build android
|
||||
```
|
||||
|
||||
**docker-compose** will take a look at the `docker-compose.yaml` file in the repository
|
||||
root directory, and build the requested target for you. At the end, docker-compose will
|
||||
tag the image built with an `upm-` prefix. You can check them by running `docker images`.
|
||||
|
||||
If you don't want to use docker-compose, you can also use `docker build` to generate every image.
|
||||
For example, to create the base image, you can do:
|
||||
|
||||
```sh
|
||||
# From the repository root folder
|
||||
$ docker build -d docker/Dockerfile.base -t upm-base .
|
||||
```
|
||||
|
||||
Now, you don't actually need to build every image to start working. Let's say you
|
||||
are a Python developer, and has no idea what Node.js is, just build the base and
|
||||
python image!
|
||||
|
||||
**NOTE:** If you work on Android Things, you will need the base, java, and android image.
|
||||
|
||||
### Using Docker Images to build Upm
|
||||
|
||||
**tl;dr:** Just use this commands to build upm:
|
||||
@ -242,7 +187,7 @@ $ docker run \
|
||||
--env BUILDSWIGPYTHON=ON \
|
||||
--env BUILDSWIGJAVA=OFF \
|
||||
--env BUILDSWIGNODE=OFF \
|
||||
upm-python \
|
||||
dnoliver/upm-python \
|
||||
bash -c "./scripts/run-cmake.sh && make -Cbuild"
|
||||
```
|
||||
|
||||
@ -256,25 +201,6 @@ to proxy settings:
|
||||
Visit [this link](https://docs.docker.com/engine/admin/systemd/#httphttps-proxy)
|
||||
to configure docker daemon behind a proxy.
|
||||
|
||||
**docker build fails to fetch packages from internet**
|
||||
|
||||
docker-compose will automatically take `http_proxy`, `https_proxy`, and `no_proxy`
|
||||
environment variables and use it as build arguments. Be sure to properly configure
|
||||
this variables before building.
|
||||
|
||||
docker, unlinke docker-compose, do not take the proxy settings from the environment
|
||||
automatically. You need to send them as build arguments:
|
||||
|
||||
```sh
|
||||
# From the repository root folder
|
||||
$ docker build \
|
||||
-d docker/Dockerfile.base \
|
||||
--build-arg http_proxy=$http_proxy \
|
||||
--build-arg https_proxy=$https_proxy \
|
||||
--build-arg no_proxy=$no_proxy \
|
||||
-t upm-base .
|
||||
```
|
||||
|
||||
**docker run fails to access the internet**
|
||||
|
||||
docker-compose will automatically take `http_proxy`, `https_proxy`, and `no_proxy`
|
||||
@ -295,6 +221,6 @@ $ docker run \
|
||||
--env http_proxy=$http_proxy \
|
||||
--env https_proxy=$https_proxy \
|
||||
--env no_proxy=$no_proxy \
|
||||
upm-python \
|
||||
dnoliver/upm-python \
|
||||
bash -c "./scripts/run-cmake.sh && make -Cbuild"
|
||||
```
|
||||
|
Reference in New Issue
Block a user