@@ -122,6 +122,16 @@ jobs:
122122 git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin main
123123 echo "cache-key=$( git merge-base origin/main ${{ github.sha }} )" >> $GITHUB_OUTPUT
124124
125+ - name : Set up Rust
126+ uses : dtolnay/rust-toolchain@stable
127+
128+ - name : Rust Cache
129+ uses : swatinem/rust-cache@v2
130+ with :
131+ # This ensures that if you have a workspace,
132+ # all crates are indexed in the cache.
133+ workspaces : " $GITHUB_WORKSPACE/rxx"
134+
125135 - name : CCache
126136 uses : actions/cache@v5
127137 with :
@@ -138,6 +148,9 @@ jobs:
138148 mkdir --parents ${MULTIPASS_PART}
139149 /snap/bin/lxc profile device add default build disk source=${MULTIPASS_PART} path=/root/parts/multipass
140150 echo "build=${MULTIPASS_PART}/build" >> $GITHUB_OUTPUT
151+ if ! command -v cargo-tarpaulin &> /dev/null; then
152+ cargo install cargo-tarpaulin
153+ fi
141154
142155 - name : Configure
143156 run : |
@@ -182,10 +195,11 @@ jobs:
182195 /snap/bin/lxc --project snapcraft exec $instance_name -- bash -c 'mkdir -p /coredump'
183196 # Enable coredumps by setting the core dump size to "unlimited", and run the tests.
184197 /snap/bin/lxc --project snapcraft exec $instance_name -- bash -c "\
198+ cd /root/parts/multipass/build && \
185199 ulimit -c unlimited && \
186200 env CTEST_OUTPUT_ON_FAILURE=1 \
187- LD_LIBRARY_PATH=/root/stage/usr/lib/x86_64-linux-gnu/:/root/stage/lib/:/root/parts/multipass/build/lib/ \
188- /root/parts/multipass/build/bin/multipass_tests "
201+ LD_LIBRARY_PATH=/root/stage/usr/lib/x86_64-linux-gnu/:/root/stage/lib/:/root/parts/multipass/build/lib/ \
202+ ctest "
189203
190204 - name : Measure coverage
191205 id : measure-coverage
@@ -249,6 +263,10 @@ jobs:
249263 # Pull the coredump folder
250264 /snap/bin/lxc --project snapcraft file pull -p -r "$instance_name/coredump" /tmp/coredump
251265 echo "Pulled the coredumps folder."
266+ mapfile -t BINS < <(cargo test --workspace --no-run --message-format=json | jq -r 'select(.reason == "compiler-artifact" and .executable != null) | .executable')
267+ export TEST_BINARIES="${BINS[*]}"
268+ for bin $TEST_BINARIES; do /snap/bin/lxc --project snapcraft file pull -p -r "$instance_name/$bin" /tmp/coredump/$bin
269+ echo "Pulled the rust executables"
252270 set +o xtrace
253271
254272 - name : Upload test coredump
0 commit comments