Skip to content

Commit ed7e71a

Browse files
committed
fix(ci): use writable unit-test caches
Signed-off-by: oliver könig <okoenig@nvidia.com>
1 parent b740bab commit ed7e71a

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎.github/actions/test-template/action.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ runs:
114114
echo "::group::Start test container"
115115
if [[ "$MOUNT_FS" == "true" ]]; then
116116
VOLUME_ARGS="--volume ${{ inputs.test-data-path }}:/home/TestData --env HF_HUB_OFFLINE=1"
117+
HF_HOME=/home/TestData/HF_HOME
118+
NEMO_HOME=/home/TestData/nemo_home
117119
else
118120
VOLUME_ARGS=""
121+
HF_HOME=/home/ubuntu/.cache/huggingface
122+
NEMO_HOME=/home/ubuntu/.cache/nemo
119123
fi
120124
121125
cmd=$(cat <<RUN_TEST_EOF
@@ -131,8 +135,8 @@ runs:
131135
--cpus=40 \
132136
--env GHA_RUNNER=${{ inputs.runner }} \
133137
--env HYDRA_FULL_ERROR=1 \
134-
--env HF_HOME=/home/TestData/HF_HOME \
135-
--env NEMO_HOME=/home/TestData/nemo_home \
138+
--env HF_HOME=$HF_HOME \
139+
--env NEMO_HOME=$NEMO_HOME \
136140
--env RUN_ID=${{ github.run_id }} \
137141
--env UV_NO_SYNC=1 \
138142
--workdir /opt/Megatron-Bridge \

‎.github/scripts/test_docker_dependency_layers.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ if grep -qE 'mcore_(commit|ref)|MCORE_COMMIT|uv sync --all-extras --all-groups'
243243
echo "Test template must use the already-validated MCore in the built image" >&2
244244
exit 1
245245
fi
246+
grep -Fq 'VOLUME_ARGS="--volume ${{ inputs.test-data-path }}:/home/TestData --env HF_HUB_OFFLINE=1"' "$composite_action"
247+
grep -q 'MOUNT_FS: ${{ inputs.is_unit_test == '\''false'\'' }}' "$composite_action"
248+
grep -q 'HF_HOME=/home/TestData/HF_HOME' "$composite_action"
249+
grep -q 'NEMO_HOME=/home/TestData/nemo_home' "$composite_action"
250+
grep -q 'HF_HOME=/home/ubuntu/.cache/huggingface' "$composite_action"
251+
grep -q 'NEMO_HOME=/home/ubuntu/.cache/nemo' "$composite_action"
246252

247253
# The baseline dependency layer must be structurally independent of the mutable
248254
# dispatched checkout. CI validates the ordering statically so this regression

0 commit comments

Comments
 (0)