Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.2 #550

Merged
merged 165 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
8c327ca
SFT-3222: Rename GitHub Action.
jeandudey Feb 6, 2024
0b6d88e
SFT-3222: Add rust-toolchain action.
jeandudey Feb 6, 2024
2e7a2e5
SFT-3222: Add lint GitHub Action.
jeandudey Feb 6, 2024
4088455
SFT-3222: Update issue number in file.
jeandudey Feb 6, 2024
c088992
SFT-3222: Update MSRV to 1.70.0.
jeandudey Feb 6, 2024
8ab6886
SFT-3222: Remove setup-just action.
jeandudey Feb 6, 2024
72ddaa6
SFT-3616: Fix Rust warnings.
jeandudey May 13, 2024
448062e
SFT-3617: Move dependabot.yml.
jeandudey May 13, 2024
8780a92
SFT-3618: Rename Schnorr sign function.
jeandudey May 10, 2024
2334cf8
SFT-3618: Add foundation.secp256k1.sign_ecdsa.
jeandudey May 10, 2024
50d91e0
SFT-3618: Add foundation.secp256k1.public_key_schnorr.
jeandudey May 13, 2024
15d8fae
SFT-3618: Use foundation.secp256k1.public_key_schnorr.
jeandudey May 13, 2024
ebf73b8
SFT-3618: Use foundation.secp256k1.sign_ecdsa.
jeandudey May 13, 2024
0a2c056
SFT-3618: Disable trezorcrypto.secp256k1.
jeandudey May 14, 2024
a16a870
SFT-3618: Don't compile unused files.
jeandudey May 14, 2024
c6c66ef
SFT-3618: Move FOUNDATION_ADDITIONS definition.
jeandudey May 14, 2024
5cb50e8
SFT-3618: Disable nist256p1 curve.
jeandudey May 14, 2024
c8531e8
SFT-3618: Disable various hash algorithms.
jeandudey May 14, 2024
d8e2295
SFT-3618: Disable secp256k1 precomputed table.
jeandudey May 14, 2024
f02b843
SFT-3618: Use lowmemory for secp256k1.
jeandudey May 14, 2024
f11cacb
SFT-3618: Enable small-hash in bitcoin_hashes.
jeandudey May 14, 2024
ee1578d
SFT-3656: Fix Rust compilation issues.
jeandudey May 21, 2024
1286bb2
Merge pull request #508 from Foundation-Devices/jeandudey/sft-3656-fi…
jeandudey May 21, 2024
8bb2889
SFT-3648: Remove unused targets on simulator.
jeandudey Feb 8, 2024
da95d35
SFT-3648: Fix unix port warning on newer compiler.
jeandudey May 20, 2024
bee8b54
SFT-3632: Update Cargo dependencies.
jeandudey May 15, 2024
cdb0763
Merge pull request #506 from Foundation-Devices/jeandudey/sft-3648-re…
jeandudey May 23, 2024
658efee
Merge pull request #504 from Foundation-Devices/jeandudey/sft-3632-up…
jeandudey May 23, 2024
5e7f3ef
SFT-2998: fix for firmware updating failures
mjg-foundation Jun 21, 2024
71cad9c
SFT-3235: enabled taproot for btcpay
mjg-foundation Jun 21, 2024
551b915
SFT-3499: moved all calculation inside try block for sha256
mjg-foundation Mar 27, 2024
51b9bf5
Merge pull request #517 from Foundation-Devices/SFT-3499-handle-error…
mjg-foundation Jun 21, 2024
e5e094d
Merge pull request #515 from Foundation-Devices/SFT-2998-firmware-upd…
mjg-foundation Jun 21, 2024
7cf9c4f
Merge pull request #516 from Foundation-Devices/SFT-3235-enable-tapro…
mjg-foundation Jun 21, 2024
589e891
SFT-3670: added theya single-sig with firmware version info
mjg-foundation May 30, 2024
47e7d9f
SFT-3670: changed "show_fw_version" to "export_fw_version"
mjg-foundation Jun 21, 2024
4deacbb
Merge pull request #510 from Foundation-Devices/SFT-3670-theya-singlesig
mjg-foundation Jun 21, 2024
6c113fd
Update version.txt to 2.3.2b1
mjg-foundation Jun 21, 2024
5f08c83
SFT-3442: erased device name on reset, needs testing
mjg-foundation Jun 21, 2024
8e406b2
Merge pull request #519 from Foundation-Devices/SFT-3442-clear-device…
mjg-foundation Jun 24, 2024
7c291dd
SFT-3694: doubled prediction list
mjg-foundation Jul 3, 2024
fe30813
SFT-2988: electrum format message signing
mjg-foundation Jul 4, 2024
f46bdc0
SFT-2998: reverting inconclusive changes
mjg-foundation Jul 4, 2024
87be389
SFT-2998: preserving reasonable changes
mjg-foundation Jul 4, 2024
cbfc690
Merge pull request #521 from Foundation-Devices/SFT-3694-improve-pred…
mjg-foundation Jul 4, 2024
3a4e508
Merge pull request #523 from Foundation-Devices/SFT-2998-revert-incon…
mjg-foundation Jul 4, 2024
5628d84
Merge pull request #524 from Foundation-Devices/dev-v2.4.0
mjg-foundation Jul 5, 2024
1eb6035
SFT-2988: capitalized Message
mjg-foundation Jul 8, 2024
b584b83
SFT-2417: Fix error kind when UR is unsupported.
jeandudey Jul 9, 2024
ec79e01
SFT-2417: Fix exception names in except blocks.
jeandudey Jul 9, 2024
7b2583b
SFT-2417: Remove pass_error from ScanQRFlow.
jeandudey Jul 9, 2024
70170d1
SFT-2417: Create upgrade your Passport alert.
jeandudey Jul 2, 2024
f602ab7
Merge pull request #520 from Foundation-Devices/jeandudey/sft-2417-cr…
jeandudey Jul 10, 2024
a1c931f
SFT-2988: used setup icon for account tools
mjg-foundation Jul 10, 2024
f6a92fe
Merge pull request #522 from Foundation-Devices/SFT-2988-message-sign…
mjg-foundation Jul 10, 2024
8370b8c
SFT-3756: updated fully noded wallet to use sparrow/json export format
mjg-foundation Jul 10, 2024
6a602ee
SFT-3812: Update foundation-urtypes to 0.4.1.
jeandudey Jul 15, 2024
0426e9f
SFT-3812: Update foundation-ur to 0.3.0.
jeandudey Jul 15, 2024
1932a8b
SFT-3812: Update Cargo.lock.
jeandudey Jul 15, 2024
cef8825
SFT-3812: Remove unused fields.
jeandudey Jul 15, 2024
8df7ef0
SFT-3800: Fix wrong exception type.
jeandudey Jul 10, 2024
97e7d22
SFT-3800: Add "QR too large" error message.
jeandudey Jul 10, 2024
baa8a54
Merge pull request #526 from Foundation-Devices/SFT-3756-support-full…
mjg-foundation Jul 15, 2024
96efb84
Merge pull request #528 from Foundation-Devices/jeandudey/sft-3812-up…
jeandudey Jul 16, 2024
736b522
SFT-3536: Add foundation-firmware crate.
jeandudey Apr 8, 2024
7003eaa
SFT-3536: Validate header with foundation-firmware.
jeandudey Apr 26, 2024
5e37d39
SFT-3764: Fix error message.
jeandudey Jul 16, 2024
2cf606b
SFT-3764: Use correct value for is_private in hdkey.
jeandudey Jul 16, 2024
d22c923
SFT-3764: Derive Debug for FFI UR types.
jeandudey Jul 16, 2024
a3cd3ab
SFT-3407: updated postmix menu with new account tools submenu
mjg-foundation Jul 16, 2024
820dd51
SFT-2988: fixed parsing newlines
mjg-foundation Jul 16, 2024
44439c4
SFT-2988: added spacing to message review page
mjg-foundation Jul 16, 2024
b77d012
Merge pull request #503 from Foundation-Devices/jeandudey/sft-3480-re…
jeandudey Jul 17, 2024
399ab93
Merge pull request #525 from Foundation-Devices/jeandudey/sft-3800-re…
jeandudey Jul 17, 2024
0f63eb2
Merge pull request #530 from Foundation-Devices/jeandudey/sft-3764-fi…
jeandudey Jul 17, 2024
44222d7
SFT-2417: Update upgrade passport message.
jeandudey Jul 16, 2024
c2e1b2c
Merge pull request #532 from Foundation-Devices/SFT-2988-fixing-messa…
mjg-foundation Jul 17, 2024
9005935
Merge pull request #531 from Foundation-Devices/SFT-3407-update-postm…
mjg-foundation Jul 17, 2024
9970a3b
SFT-2988: fixed cutoff question icon
mjg-foundation Jul 17, 2024
cc024f1
SFT-2988: removed scrollbar when signing for segwit addresses
mjg-foundation Jul 17, 2024
3742f96
Merge pull request #533 from Foundation-Devices/SFT-2988-fixing-cutof…
mjg-foundation Jul 18, 2024
c3b70f1
Merge pull request #529 from Foundation-Devices/jeandudey/sft-2417-cr…
jeandudey Jul 18, 2024
d5ca116
SFT-3847: removed btcpay taproot
mjg-foundation Jul 22, 2024
caaa283
SFT-3854: Enable debug logging when signing firmware.
jeandudey Jul 22, 2024
661053b
SFT-3480: Update foundation-firmware to 0.1.2.
jeandudey Jul 22, 2024
2474ae4
Merge pull request #536 from Foundation-Devices/SFT-3480
jeandudey Jul 23, 2024
f7545c7
Merge pull request #534 from Foundation-Devices/SFT-3847-remove-btcpa…
mjg-foundation Jul 23, 2024
f1e076e
Merge pull request #535 from Foundation-Devices/jeandudey/sft-3854-en…
jeandudey Jul 24, 2024
fbfd59e
SFT-1943: fixed predictive text page holding onto previous entries
mjg-foundation Jul 24, 2024
ad9d177
SFT-1728: starting with temporary settings mode
mjg-foundation Apr 5, 2024
8ac3e31
SFT-1728: fixed copying and added device settings exception
mjg-foundation Apr 5, 2024
a832451
SFT-1728: importing temporary seed working
mjg-foundation Apr 5, 2024
11184e4
SFT-1728: temporarily restored from backups
mjg-foundation Apr 5, 2024
f5c9070
SFT-1728: accounted for device settings
mjg-foundation Apr 8, 2024
5ede413
SFT-1728: entering temporary seed after permanent setup
mjg-foundation Apr 9, 2024
c1f346a
SFT-1728: entering temporary mode from key manager, still needs UI work
mjg-foundation Apr 9, 2024
e5b79c0
SFT-1728: fixed simulator in temporary mode, improved temporary mode UI
mjg-foundation Apr 10, 2024
d14e9a2
SFT-1728: moved temporary functionality into temporary_seed_flow
mjg-foundation Apr 12, 2024
ca6b8c1
SFT-1728: incorporated comments and ui improvements
mjg-foundation Apr 18, 2024
d08d6a6
SFT-1728: improved temporary seed question
mjg-foundation May 20, 2024
166c109
SFT-1728: removed spinner when clearing temporary seed
mjg-foundation Jun 21, 2024
41a5775
SFT-1728: removed old TODOs
mjg-foundation Jul 4, 2024
f8e9a7d
SFT-1728: first pass of hourglass icons, removed prints
mjg-foundation Jul 15, 2024
58c1b94
SFT-1728: prevented erasing from temporary mode, fixed normal erasing…
mjg-foundation Jul 16, 2024
35102f0
SFT-1728: hid restore backup in temporary mode, fixed backup code for…
mjg-foundation Jul 16, 2024
b67eb9f
SFT-1728: prevented saving nostr keys as temporary seed
mjg-foundation Jul 16, 2024
51f906b
SFT-1728: fixing wording and capitalization
mjg-foundation Jul 16, 2024
c84445b
SFT-1728: avoided scrollbar in key item menu
mjg-foundation Jul 17, 2024
f6f67e9
SFT-1728: another iteration of hourglass icons
mjg-foundation Jul 17, 2024
4d07332
SFT-1728: improved mono background for hourglass icon
mjg-foundation Jul 18, 2024
b263378
SFT-1728: manually edited hourglass background code to increase its v…
mjg-foundation Jul 18, 2024
8c76984
SFT-1728: finalized hourglass mono background
mjg-foundation Jul 22, 2024
d7f9975
SFT-1728: ensured initial seeds can be temporary, removed print
mjg-foundation Jul 22, 2024
77bfe63
SFT-1728: fixed import header and added cancel button to initial backup
mjg-foundation Jul 23, 2024
81ef57d
SFT-1728: removed unnecessary changes, fixed some copy, used hourglass
mjg-foundation Jul 23, 2024
ed8702a
SFT-1728: fixed account index out of bounds when switching keys
mjg-foundation Jul 26, 2024
a1706a9
SFT-1943: tested and fixed restoring backups with 6 word encryption
mjg-foundation Jul 29, 2024
a88b855
SFT-1728: temporary seeds entered from plus menu return to plus menu
mjg-foundation Jul 30, 2024
e095fb6
Merge pull request #537 from Foundation-Devices/SFT-1943-restore-from…
mjg-foundation Jul 30, 2024
20e8711
Merge pull request #518 from Foundation-Devices/SFT-1728-temporary-seeds
mjg-foundation Jul 30, 2024
b3d5329
Update version.txt to v2.3.2b7
mjg-foundation Jul 30, 2024
ddf9782
SFT-3903: fixed passphrase and temporary seed interactions
mjg-foundation Aug 1, 2024
f1c9695
SFT-3902: fixed runaway temporary mode
mjg-foundation Aug 1, 2024
86ac3db
SFT-3903: added extra check before clearing a temporary seed
mjg-foundation Aug 1, 2024
dce2ec5
Merge pull request #539 from Foundation-Devices/SFT-3902-restore-afte…
mjg-foundation Aug 2, 2024
fe114cf
SFT-3903: added mention of clearing passphrases with the temporary seed
mjg-foundation Aug 2, 2024
a703c9b
SFT-3903: fixed capitalization, implemented Ken's copy suggestion
mjg-foundation Aug 5, 2024
8dc6dae
SFT-3903: Ken's copy suggestion
mjg-foundation Aug 6, 2024
620cc2b
Merge pull request #538 from Foundation-Devices/SFT-3903-clear-passph…
mjg-foundation Aug 7, 2024
3cc4308
Update version.txt to v2.3.2b8
mjg-foundation Aug 7, 2024
57bc334
SFT-3975: added security word toggle to device settings
mjg-foundation Aug 12, 2024
2452834
SFT-3975: added pin_prefix_hash to device settings
mjg-foundation Aug 12, 2024
cafc0e9
SFT-3980: first pass at clarifying psbt fingerprint mismatch message
mjg-foundation Aug 12, 2024
5630767
SFT-3980: fixed wrong wallet signature message
mjg-foundation Aug 14, 2024
2a5543a
SFT-3980: removed debug
mjg-foundation Aug 14, 2024
a0418f1
SFT-3982: removed backup prompts for temp seed entries, unless the fi…
mjg-foundation Aug 14, 2024
fe5bb64
SFT-3980: fixed ordering of XFPs mentioned, reverting messaging to
mjg-foundation Aug 14, 2024
aae320d
Merge pull request #542 from Foundation-Devices/SFT-3982-remove-backu…
mjg-foundation Aug 14, 2024
9c70b37
Merge pull request #540 from Foundation-Devices/SFT-3975-temporary-se…
mjg-foundation Aug 14, 2024
ca884ba
Merge pull request #541 from Foundation-Devices/SFT-3980-temporary-se…
mjg-foundation Aug 14, 2024
b0d15a0
Update version.txt to 2.3.2b9
mjg-foundation Aug 14, 2024
cc82a1e
SFT-3982: only run autobackup if quiz was passed
mjg-foundation Aug 16, 2024
50d0d8a
Merge pull request #543 from Foundation-Devices/SFT-3982-dont-autobac…
mjg-foundation Aug 19, 2024
bf6d4b0
Update version.txt to beta 10
mjg-foundation Aug 19, 2024
61635e3
SFT-4094: formalized multisig policy default, clarified warning langu…
mjg-foundation Aug 20, 2024
03c3737
SFT-4094: updated multisig policy constant names for readability
mjg-foundation Aug 20, 2024
989add3
SFT-4103: fixed missing keys messaging when signing a taproot transac…
mjg-foundation Aug 21, 2024
d3fe8e6
SFT-4103: removed TODO
mjg-foundation Aug 21, 2024
eb91120
SFT-4094: made a central function to get multisig policy, temporary k…
mjg-foundation Aug 21, 2024
51fbca2
SFT-4094: removed commented code
mjg-foundation Aug 22, 2024
a29c776
SFT-4095: added update settings and other universal settings to device
mjg-foundation Aug 22, 2024
aaee128
SFT-4094: improved multisig import flow
mjg-foundation Aug 22, 2024
45895e2
SFT-4094: changed prompt from create to import
mjg-foundation Aug 23, 2024
56169ac
SFT-4094: removed excess diff
mjg-foundation Aug 23, 2024
ff07483
Merge pull request #544 from Foundation-Devices/SFT-4103-fix-taproot-…
mjg-foundation Aug 23, 2024
6db84f7
Merge pull request #545 from Foundation-Devices/SFT-4095-make-update-…
mjg-foundation Aug 23, 2024
a477a0c
Merge branch 'dev-v2.3.2' into SFT-4094-multisig-policy-clarification
mjg-foundation Aug 23, 2024
6e8f4a7
Merge pull request #546 from Foundation-Devices/SFT-4094-multisig-pol…
mjg-foundation Aug 23, 2024
aca781a
Update version.txt to 2.3.2bB (11)
mjg-foundation Aug 23, 2024
8673947
SFT-4088: erased multisig policy on device reset
mjg-foundation Aug 26, 2024
7fafe71
SFT-4120: standardized menu icons and messages
mjg-foundation Aug 26, 2024
e655676
SFT-4120: changed account options to "Rename" and "Delete"
mjg-foundation Aug 27, 2024
871727d
Merge pull request #547 from Foundation-Devices/SFT-4088-erase-multis…
mjg-foundation Aug 27, 2024
8dcc96d
Merge pull request #548 from Foundation-Devices/SFT-4120-standardize-…
mjg-foundation Aug 27, 2024
9bdb07f
Update version.txt to 2.3.2bC (12)
mjg-foundation Aug 27, 2024
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
123 changes: 123 additions & 0 deletions .github/actions/rust-toolchain/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: rustup toolchain install
author: David Tolnay
description: Install the Rust toolchain
branding:
icon: activity
color: purple

inputs:
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: true
targets:
description: Comma-separated list of target triples to install for this toolchain
required: false
target:
description: Alias for `targets`
required: false
components:
description: Comma-separated list of components to be additionally installed
required: false

outputs:
cachekey:
description: A short hash of the rustc version, appropriate for use as a cache key. "20220627a831"
value: ${{steps.rustc-version.outputs.cachekey}}
name:
description: Rustup's name for the selected version of the toolchain. "1.62.0" # suitable for use with `cargo +${{steps.toolchain.outputs.name}}`
value: ${{steps.parse.outputs.toolchain}}

runs:
using: composite
steps:
- id: parse
run: |
: parse toolchain version
if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
if [[ ${{runner.os}} == macOS ]]; then
echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT
else
echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT
fi
elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then
echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT
else
echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi
env:
toolchain: ${{inputs.toolchain}}
shell: bash

- id: flags
run: |
: construct rustup command line
echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
echo "downgrade=${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
env:
targets: ${{inputs.targets || inputs.target || ''}}
components: ${{inputs.components}}
shell: bash

- run: |
: install rustup if needed
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
if: runner.os != 'Windows'
shell: bash

- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
shell: bash

- run: rustup default ${{steps.parse.outputs.toolchain}}
shell: bash

- id: rustc-version
run: |
: create cachekey
DATE=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p')
HASH=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p')
echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT
shell: bash

- run: |
: disable incremental compilation
if [ -z "${CARGO_INCREMENTAL+set}" ]; then
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
fi
shell: bash

- run: |
: enable colors in Cargo output
if [ -z "${CARGO_TERM_COLOR+set}" ]; then
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
fi
shell: bash

- run: |
: enable Cargo sparse registry
# implemented in 1.66, stabilized in 1.68, made default in 1.70
if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol ]; then
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[89]\.'; then
touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
elif rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[67]\.'; then
touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV
fi
fi
shell: bash

- run: |
: work around spurious network errors in curl 8.0
# https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.7[01]\.'; then
echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV
fi
shell: bash

- run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose
shell: bash
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,13 @@
#
# validate_and_build.yaml - GitHub actions for Passport

name: Validate and Build
name: Build
on: [push]
jobs:
lint:
name: Lint
firmware:
name: Firmware
runs-on: ubuntu-20.04

services:
registry:
image: registry:2
ports:
- 5000:5000

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/build-push-action@v5
with:
push: true
context: .
cache-from: type=gha
cache-to: type=gha
tags: localhost:5000/foundation-devices/passport2:latest
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d
- run: echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV

- name: Lint the codebase
run: just lint

build-firmware:
name: Build Firmware
runs-on: ubuntu-20.04
needs: [lint]

strategy:
matrix:
build:
Expand Down Expand Up @@ -69,7 +38,11 @@ jobs:
cache-from: type=gha
cache-to: type=gha
tags: localhost:5000/foundation-devices/passport2:latest
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: |
echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV
echo "SCREEN_MODE=$(echo "${{ matrix.build.screen }}" | tr a-z A-Z)" >> $GITHUB_ENV
Expand Down Expand Up @@ -120,12 +93,12 @@ jobs:
name: v${{env.version}}${{ matrix.build.hash_suffix }}-hashes.md
path: ports/stm32/build-Passport/v${{env.version}}-beta${{ matrix.build.hash_suffix }}-hashes.md

build-bootloader:
name: Build Bootloader
bootloader:
name: Bootloader
runs-on: ubuntu-20.04
needs: [lint, build-firmware]
needs: [firmware]

# TODO: PASS1-665.
# TODO: SFT-1077.
strategy:
matrix:
screen: ['color']
Expand All @@ -150,7 +123,11 @@ jobs:
cache-from: type=gha
cache-to: type=gha
tags: localhost:5000/foundation-devices/passport2:latest
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: |
echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV
echo "SCREEN_MODE=$(echo ${{ matrix.screen }} | tr a-z A-Z)" >> $GITHUB_ENV
Expand All @@ -164,10 +141,10 @@ jobs:
name: bootloader-${{ env.SCREEN_MODE }}.bin
path: ports/stm32/boards/Passport/bootloader/arm/release/bootloader-${{ env.SCREEN_MODE }}.bin

build-simulator:
name: Build Simulator
simulator:
name: Simulator
runs-on: ubuntu-20.04
needs: [lint, build-firmware]
needs: [firmware]

strategy:
matrix:
Expand All @@ -193,16 +170,19 @@ jobs:
cache-from: type=gha
cache-to: type=gha
tags: localhost:5000/foundation-devices/passport2:latest
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV

- name: Build
run: just build-simulator ${{ matrix.screen }}

build-tools:
name: Build Tools
name: Tools
runs-on: ubuntu-20.04
needs: [lint]

services:
registry:
Expand All @@ -224,7 +204,11 @@ jobs:
cache-from: type=gha
cache-to: type=gha
tags: localhost:5000/foundation-devices/passport2:latest
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV

- name: Build
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# SPDX-FileCopyrightText: © 2024 Foundation Devices, Inc. <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later

name: Lint
on: [push, pull_request]
jobs:
is-reuse-compliant:
name: Is REUSE compliant?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fsfe/reuse-action@v2

rust-code-compiles:
name: Rust code compiles?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets: thumbv7em-none-eabihf
- run: |
cargo check --manifest-path extmod/foundation-rust/Cargo.toml
# Required by secp256k1-sys.
- run: sudo apt-get install -y gcc-arm-none-eabi
- run: |
cargo check --manifest-path extmod/foundation-rust/Cargo.toml \
--target thumbv7em-none-eabihf

is-the-rust-code-formatted:
name: Is the Rust code formatted?
needs: [rust-code-compiles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
components: rustfmt
- run: |
cargo fmt --manifest-path extmod/foundation-rust/Cargo.toml \
--all -- --check

is-the-python-code-formatted:
name: Is the Python code formatted?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y pycodestyle
- run: pycodestyle --statistics --exclude translations ports/stm32/boards/Passport

is-foundation-header-up-to-date:
name: Is foundation.h header file up to date?
needs: [rust-code-compiles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
- run: cargo install cbindgen@^0.24 --locked
- run: |
cbindgen --config extmod/foundation-rust/cbindgen.toml \
--output extmod/foundation-rust/include/foundation.h \
--verify \
extmod/foundation-rust/

rust-tests-pass:
name: Rust tests pass?
needs: [rust-code-compiles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
targets:
- run: |
cargo test --manifest-path extmod/foundation-rust/Cargo.toml \
--features std
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ Files:
version.txt
Copyright: © 2021 Foundation Devices, Inc. <[email protected]>
License: GPL-3.0-or-later

Files: .github/actions/rust-toolchain/action.yml
Copyright: 2021 David Tolnay <[email protected]>
License: MIT
Loading