mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
ci: add hwi tests for core and legacy builds
This commit is contained in:
parent
9a71ac74c9
commit
48d7f71ccc
12
ci/shell.nix
12
ci/shell.nix
@ -41,11 +41,23 @@ let
|
|||||||
llvmPackages = nixpkgs.llvmPackages_12;
|
llvmPackages = nixpkgs.llvmPackages_12;
|
||||||
# see pyright/README.md for update procedure
|
# see pyright/README.md for update procedure
|
||||||
pyright = nixpkgs.callPackage ./pyright {};
|
pyright = nixpkgs.callPackage ./pyright {};
|
||||||
|
# HWI tests need https://github.com/bitcoin/bitcoin/pull/22558
|
||||||
|
# remove this once nixpkgs version contains this patch
|
||||||
|
bitcoind = (nixpkgs.bitcoind.overrideAttrs (attrs: {
|
||||||
|
version = attrs.version + "-taproot-psbt";
|
||||||
|
src = nixpkgs.fetchFromGitHub {
|
||||||
|
owner = "achow101";
|
||||||
|
repo = "bitcoin";
|
||||||
|
rev = "taproot-psbt";
|
||||||
|
sha256 = "sha256-Am7SVxOTlTUjESk8O7kziwyV2GaBX6pGB1oksYPc1EE=";
|
||||||
|
};
|
||||||
|
}));
|
||||||
in
|
in
|
||||||
with nixpkgs;
|
with nixpkgs;
|
||||||
stdenvNoCC.mkDerivation ({
|
stdenvNoCC.mkDerivation ({
|
||||||
name = "trezor-firmware-env";
|
name = "trezor-firmware-env";
|
||||||
buildInputs = lib.optionals fullDeps [
|
buildInputs = lib.optionals fullDeps [
|
||||||
|
bitcoind
|
||||||
# install other python versions for tox testing
|
# install other python versions for tox testing
|
||||||
# NOTE: running e.g. "python3" in the shell runs the first version in the following list,
|
# NOTE: running e.g. "python3" in the shell runs the first version in the following list,
|
||||||
# and poetry uses the default version (currently 3.8)
|
# and poetry uses the default version (currently 3.8)
|
||||||
|
31
ci/test.yml
31
ci/test.yml
@ -374,6 +374,20 @@ core persistence asan test:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
core hwi test:
|
||||||
|
stage: test
|
||||||
|
<<: *gitlab_caching
|
||||||
|
needs:
|
||||||
|
- core unix frozen debug build
|
||||||
|
script:
|
||||||
|
- nix-shell --run "git clone https://github.com/bitcoin-core/HWI.git"
|
||||||
|
- nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build/unix/trezor-emu-core bitcoind"
|
||||||
|
artifacts:
|
||||||
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||||
|
paths:
|
||||||
|
- HWI/trezor-t-emulator.stdout
|
||||||
|
expire_in: 1 week
|
||||||
|
when: always
|
||||||
|
|
||||||
# Crypto
|
# Crypto
|
||||||
|
|
||||||
@ -512,7 +526,22 @@ legacy upgrade asan test:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
legacy hwi test:
|
||||||
|
stage: test
|
||||||
|
<<: *gitlab_caching
|
||||||
|
needs:
|
||||||
|
- legacy emu regular debug build
|
||||||
|
variables:
|
||||||
|
EMULATOR: "1"
|
||||||
|
script:
|
||||||
|
- nix-shell --run "git clone https://github.com/bitcoin-core/HWI.git"
|
||||||
|
- nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_1 ../legacy/firmware/trezor.elf bitcoind"
|
||||||
|
artifacts:
|
||||||
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||||
|
paths:
|
||||||
|
- HWI/trezor-1-emulator.stdout
|
||||||
|
expire_in: 1 week
|
||||||
|
when: always
|
||||||
# Python
|
# Python
|
||||||
|
|
||||||
python test:
|
python test:
|
||||||
|
Loading…
Reference in New Issue
Block a user