Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,37 @@ jobs:
# `ProtectControlGroups=` does not come into it). With the variable set the case FAILS on a
# machine that cannot measure instead of skipping: if this step goes green by skipping, the
# cgroup path has stopped being tested and nothing else would say so.
#
# This is the one step of an image leg that runs a built binary on the HOST, because the
# scope is the host's systemd. The binary was linked in the image against the image's
# shared yaml-cpp, which the host no longer installs (the apt step above is native-legs-only),
# so the step died in the loader, exit 127, before any case ran. The library is taken from
# the image the binary was linked in rather than from apt: that is the copy it was built
# against, and it keeps the runner's apt sources out of this leg. Anything else the host
# cannot resolve is named before the run instead of one library at a time by the loader.
- name: "Test the compile-memory meter in a delegated cgroup"
if: ${{ needs.changes.outputs.code != 'false' && matrix.preset == 'clang-release' }}
env:
TESTS: ${{ github.workspace }}/out/build/${{ matrix.preset }}/target/pace-node-tests
run: |
set -euo pipefail
runtime="$RUNNER_TEMP/image-runtime"
mkdir -p "$runtime"
yaml=$(docker exec ci-image ldd "$TESTS" | awk '/libyaml-cpp/ { print $3 }')
if [ -z "$yaml" ]; then
echo "::error title=compile-memory meter::the image's ldd names no libyaml-cpp for ${TESTS}, so there is nothing to hand the host"
exit 1
fi
docker exec ci-image cat "$yaml" > "$runtime/$(basename "$yaml")"
unresolved=$(LD_LIBRARY_PATH="$runtime" ldd "$TESTS" | awk '/not found/ { print $1 }')
if [ -n "$unresolved" ]; then
echo "::error title=compile-memory meter::the host cannot resolve: ${unresolved}"
exit 1
fi
sudo systemd-run --scope --quiet -p Delegate=yes \
--setenv=PACE_TEST_CGROUP_DELEGATED=1 \
"$PWD/out/build/${{ matrix.preset }}/target/pace-node-tests" "[cgroup]"
--setenv=LD_LIBRARY_PATH="$runtime" \
"$TESTS" "[cgroup]"

# The binaries the smoke jobs drive: the daemon every job starts, the launcher
# the compile-cache smoke job points at it, and `mid-compile-edit-stub`, the
Expand Down
Loading