Skip to content

Commit 7e2aba1

Browse files
committed
updated development guide with local development isntructions
1 parent 1cab5b0 commit 7e2aba1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

DEVELOPMENT.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ GITHUB_TOKEN=**** TAG_NAME=v1.0.0 make -f .ci/Makefile draft-release
3131
make -f .ci/Makefile help
3232
```
3333

34+
### Local development with direct calls to cmake inside docker container
35+
\
36+
If you want to make local development easier, you can call build directly via docker commands.\
37+
All you need to do is mount the path with the sources to the `/source` directory inside the container.\
38+
\
39+
To further speed up build, it is a good idea to mount the local conan cache so that it uses a folder outside the container. The location is arbitrary, but should preferably point outside the source folder. This is optional, if you omit it, conan will place the cache inside the container in the `/home/build/.conan` folder.
40+
\
41+
Make sure to always use the latest version of the image you are using for the build. You can find the current version inside the `.ci/Makefile` in `build:` section
42+
43+
```bash
44+
# this will build agent for linux-x86-64
45+
docker run -v "/path/to/your/apm-agent-php:/source" -v "/path/to/your/conan:/home/build/.conan:rw" -w /source/agent/native elasticobservability/apm-agent-php-dev:native-build-gcc-12.2.0-linux-x86-64-0.0.2 sh -c "cmake --preset linux-x86-64-release && cmake --build --preset linux-x86-64-release"
46+
# this will build agent for linuxmusl-x86-64
47+
docker run -v "/path/to/your/apm-agent-php:/source" -v "/path/to/your/conan:/home/build/.conan:rw" -w /source/agent/native elasticobservability/apm-agent-php-dev:native-build-gcc-12.2.0-linuxmusl-x86-64-0.0.2 sh -c "cmake --preset linuxmusl-x86-64-release && cmake --build --preset linuxmusl-x86-64-release"
48+
49+
```
50+
51+
3452
_NOTE_:
3553

3654
* `PHP_VERSION` can be set to a different PHP version.

0 commit comments

Comments
 (0)