Skip to content

Commit a42c71c

Browse files
committed
ci, coldcard: clone once
Avoids spurious CI failures by not re-cloning the large repo with many submodules in every test job.
1 parent cafc8b0 commit a42c71c

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/actions/build-sim/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@ runs:
3636
cd test
3737
./setup_environment.sh --"${{ inputs.name }}"
3838
cd ..
39-
tar -czf "${{ inputs.archive }}.tar.gz" ${{ inputs.paths }}
39+
40+
# For coldcard, include the full firmware directory but strip .git directories
41+
# This avoids re-cloning the large repo with many submodules in every test job
42+
if [ "${{ inputs.name }}" = "coldcard" ]; then
43+
# Remove .git directories to shrink the archive
44+
find test/work/firmware -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true
45+
# Archive the full firmware directory
46+
tar -czf "${{ inputs.archive }}.tar.gz" test/work/firmware
47+
else
48+
tar -czf "${{ inputs.archive }}.tar.gz" ${{ inputs.paths }}
49+
fi
4050
4151
- uses: actions/upload-artifact@v4
4252
with:

.github/actions/install-sim/action.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,13 @@ runs:
2020
2121
- if: inputs.device == 'coldcard'
2222
shell: bash
23-
env:
24-
# Keep in sync with test/setup_environment.sh
25-
COLDCARD_VERSION: "2025-09-30T1238-v5.4.4"
2623
run: |
2724
apt-get update
2825
apt-get install -y libpcsclite-dev libusb-1.0-0 swig
29-
git config --global user.email "ci@ci.com"
30-
git config --global user.name "ci"
31-
# Note: cannot use --shallow-submodules because lwip submodule on git.savannah.gnu.org doesn't support it
32-
pushd test/work; git clone --recursive --depth 1 --branch ${COLDCARD_VERSION} https://github.com/Coldcard/firmware.git; popd
26+
27+
# Extract the archive - this includes the full firmware directory
3328
tar -xvf coldcard-mpy.tar.gz
34-
pushd test/work/firmware; git am ../../data/coldcard-multisig.patch; popd
29+
3530
poetry run pip install -r test/work/firmware/requirements.txt
3631
pip install -r test/work/firmware/requirements.txt
3732
poetry run pip install pysdl2-dll

0 commit comments

Comments
 (0)