diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 299fba5..e90bac8 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -20,6 +20,7 @@ jobs: - name: test Zenoh run: | set -x + ( cd zenoh && patch -p1 < ../zenoh-patch.diff ) sudo chown -R 1000 zenoh time docker run \ -v $(realpath zenoh):/src \ diff --git a/README.md b/README.md index 02b318e..215c0af 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ A container is created which contains a sysroot and image: - Target is a QEMU image, simulating an aarch64 CPU - Tests are executed on target using the script [run_on_target.sh](scripts/run_on_target.sh), which uploads the file and runs it. - - WARNING: It only executes one (small) unit test to reduce the disk usage. Standard Github action runners run out of space otherwise. + - The zenoh build configuration is slightly changed to reduce disk space usage (especially debug symbols are disabled, see [patch](./zenoh-patch.diff) for details) diff --git a/scripts/test-zenoh.sh b/scripts/test-zenoh.sh index 4c17809..6f22b6e 100755 --- a/scripts/test-zenoh.sh +++ b/scripts/test-zenoh.sh @@ -17,10 +17,21 @@ cd /src ssh target "mkdir -p /tmp/test/a/b" scp DEFAULT_CONFIG.json5 target:/tmp/test +# The runners sometimes run out of disk space, which is why it is monitored: +show_res_usage () { + set +ex + sleep 5 + while true ; do + sleep 10 + echo "$(echo ============ && df -h . && du -shc target/* && echo ============)" + done +} +show_res_usage & + # Run tests if [[ "$*" == *"--only-one-test"* ]] ; then # only run one small test, as we would run out of disk space otherwise (on standard Github action runners) cd commons/zenoh-buffers fi -df -h . -cargo t --target aarch64-unknown-linux-gnu --release + +cargo t --target aarch64-unknown-linux-gnu -j1 diff --git a/zenoh-patch.diff b/zenoh-patch.diff new file mode 100644 index 0000000..4b9a44f --- /dev/null +++ b/zenoh-patch.diff @@ -0,0 +1,19 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 4e1c6299..bf7d6efc 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -204,8 +204,13 @@ zenoh-runtime = { version = "0.11.0", path = "commons/zenoh-runtime" } + zenoh-task = { version = "0.11.0", path = "commons/zenoh-task" } + + [profile.dev] +-debug = true +-opt-level = 0 ++debug = false ++debug-assertions = false ++lto = false ++strip = true ++incremental = false ++opt-level = "s" + + [profile.fast] + inherits = "release"