Skip to content

Commit bd6bb91

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. Additionally, stip .git folder(s) for all devices to shrink archives.
1 parent 52e9c4b commit bd6bb91

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ runs:
3636
cd test
3737
./setup_environment.sh --"${{ inputs.name }}"
3838
cd ..
39+
40+
# Remove .git directories to shrink the archive
41+
for p in ${{ inputs.paths }}; do
42+
find "$p" -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true
43+
done
3944
tar -czf "${{ inputs.archive }}.tar.gz" ${{ inputs.paths }}
4045
4146
- uses: actions/upload-artifact@v4

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

Lines changed: 4 additions & 9 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
33-
tar -xvf coldcard-mpy.tar.gz
34-
pushd test/work/firmware; git am ../../data/coldcard-multisig.patch; popd
26+
27+
# Extract the archive - this includes the full firmware directory
28+
tar -xvf coldcard-firmware.tar.gz
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

.github/sim-build-map.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{ "name": "trezor-t", "archive": "trezor-firmware", "paths": "test/work/trezor-firmware" }
55
],
66
"coldcard": [
7-
{ "name": "coldcard", "archive": "coldcard-mpy", "paths": "test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port" }
7+
{ "name": "coldcard", "archive": "coldcard-firmware", "paths": "test/work/firmware" }
88
],
99
"bitbox": [
1010
{ "name": "bitbox01", "archive": "mcu", "paths": "test/work/mcu" },

0 commit comments

Comments
 (0)