From a42198e25e869bc721202e94549e56538fe9836b Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Wed, 11 Mar 2020 09:36:51 -0700 Subject: [PATCH 1/5] Build for Ubuntu using docker container - `docker_build.sh` builds all - `docker_build.sh clean` build clean - `docker_build.sh run_tests` builds and runs tests --- tools/docker_build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 tools/docker_build.sh diff --git a/tools/docker_build.sh b/tools/docker_build.sh new file mode 100755 index 00000000000000..011774cf0a4eb3 --- /dev/null +++ b/tools/docker_build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -e + +here="$(dirname "$0")" + +MAKE_TARGET="${1:-all}" + +docker run --rm -v "${PWD}/$here/..":/tmp/chip rsmmr/clang make -C /tmp/chip "${MAKE_TARGET}" From 7851e2da53226f699b267e54673cb6ea273127a5 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Wed, 11 Mar 2020 10:22:19 -0700 Subject: [PATCH 2/5] Update readme for docker information --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index dbf2b5dedc4124..c6f4e9e3e5c34f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ The CHIP repository is structured as follows: | `tests/` | Tests for CHIP | | `tools/` | Tools needed to work with the CHIP repo, as well as develop in the repository | +# Third Party Tools + +Some tools and utilities are dependent on third party tools, such as Docker. + +[Docker](https://www.docker.com) provides a convenient way to run cross platform commands, using containers. Install stable version of [Docker Desktop](https://www.docker.com/products/docker-desktop) relevant to your native OS (MacOS or Windows). Once installed, you can run docker commands from the shell/terminal. + # Contributing We would love for you to contribute to CHIP and help make it even From 776b9aac136cbf4819c6112e4167dcfc67c6b54c Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Wed, 11 Mar 2020 14:58:01 -0700 Subject: [PATCH 3/5] Address review comments in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6f4e9e3e5c34f..d0a05bf63fc8b8 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The CHIP repository is structured as follows: Some tools and utilities are dependent on third party tools, such as Docker. -[Docker](https://www.docker.com) provides a convenient way to run cross platform commands, using containers. Install stable version of [Docker Desktop](https://www.docker.com/products/docker-desktop) relevant to your native OS (MacOS or Windows). Once installed, you can run docker commands from the shell/terminal. +[Docker](https://www.docker.com) is an excellent way to have stable build environments that don't pollute the host OS. It is also much easier to maintain stability across multiple host environments. Install stable version of [Docker Desktop](https://www.docker.com/products/docker-desktop) relevant to your native OS (MacOS or Windows). Once installed, you can run docker commands from the shell/terminal. # Contributing From fb3cd4260babe016ae0f9f5ab9889fead938aa1a Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Thu, 12 Mar 2020 12:54:06 -0700 Subject: [PATCH 4/5] Move build_docker.sh to build/scripts/docker folder --- {tools => build/scripts/docker}/docker_build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {tools => build/scripts/docker}/docker_build.sh (100%) diff --git a/tools/docker_build.sh b/build/scripts/docker/docker_build.sh similarity index 100% rename from tools/docker_build.sh rename to build/scripts/docker/docker_build.sh From 02dfc2025a4ddf86c61a7029b1d031f92754865a Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Thu, 12 Mar 2020 12:57:03 -0700 Subject: [PATCH 5/5] fix path and address some review comments in build_docker.sh --- build/scripts/docker/docker_build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/scripts/docker/docker_build.sh b/build/scripts/docker/docker_build.sh index 011774cf0a4eb3..af4a76f3f4801f 100755 --- a/build/scripts/docker/docker_build.sh +++ b/build/scripts/docker/docker_build.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -e -here="$(dirname "$0")" +here=$(dirname "$0") -MAKE_TARGET="${1:-all}" +MAKE_TARGET=${1:-all} -docker run --rm -v "${PWD}/$here/..":/tmp/chip rsmmr/clang make -C /tmp/chip "${MAKE_TARGET}" +docker run --rm -v "${PWD}/$here/../../..":/tmp/chip rsmmr/clang make -C /tmp/chip "${MAKE_TARGET}"