Skip to content

Commit

Permalink
Update develop.adoc with docker usage snippet.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed May 13, 2024
1 parent 91f228a commit 235fe13
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/develop.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,25 @@ Or, more specific:
ctest -V -R cli_tests-Misc
--

If test fails under the specific OS, you should construct corresponding Docker container and run tests inside, taking Github workflows as a guide.
If test fails under the specific OS, you may use corresponding Docker container which is used by the CI.
We maintain a bunch of containers which install all the prerequisites in this repository: https://github.com/rnpgp/rnp-ci-containers

Sample building and running process could be as following:

[source,console]
--
# Start docker, mounting rnp sources directory
docker run -it -v $(pwd):/opt/rnp:ro ghcr.io/rnpgp/ci-rnp-fedora-38-amd64 bash

# Configure and build rnp, adding additional options like backend selection or enabled sanitizers if needed
cd /opt
cmake -B build -DBUILD_SHARED_LIBS=On -DCRYPTO_BACKEND=Botan ./rnp
cmake --build build --parallel "$(nproc)"

# Run the tests. Please note that some tests would fail if run under the root as they check permissions.
# Please see how this is handled in centos-and-fedora.yml or other workflows.
ctest --parallel $(nproc) --test-dir build --output-on-failure
--

== Code Coverage

Expand Down

0 comments on commit 235fe13

Please sign in to comment.