build(core): rename build-xtask/ to build/
What changed, and why it matters
This commit is a simple rename of the build output directory from `core/build-xtask/` to `core/build/` across build scripts, CI workflows, documentation, and test helpers. It does not change any firmware code, cryptographic logic, or security behavior. It is purely a build-system maintenance change.
No security action needed. Treat as routine build-system cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates all references to the build directory path from build-xtask to build, including GitHub Actions workflows, Makefiles, Rust cargo target-dir configuration, xtask artifact collection, emulator launchers, coverage tooling, and documentation. No functional code is modified; only paths and test expectations are adjusted.
Changed components
core/Makefilecore/embed/.cargo/config.tomlcore/embed/xbuild/src/helpers.rscore/embed/xtask/src/artifacts.rscore/emu.pycore/tests/run_tests.shcore/tools/coverage-collect.pydocs/core/build/xtask.mdpython/src/trezorlib/_internal/prodtest_emulator.pytbench.tomltests/emulators.pytests/prodtest_tests/conftest.pytools/print-rust-stack-sizes.py.github/actions/build-core-emu/action.yml.github/workflows/core-hw.yml.github/workflows/core.yml.github/workflows/crowdin-ui-check-reuse.yml.github/workflows/crowdin-ui-check.ymlAGENTS.mdbuild-docker.shInspect captured patch +82 / −82
### .github/actions/build-core-emu/action.yml
@@ -32,8 +32,8 @@ runs:
- id: prepare_binary
run: |
- TARGET="core/build-xtask/artifacts/latest/trezor-emu-core-${{ inputs.model }}-v${{ inputs.version }}${{ inputs.binary-suffix }}"
- mv core/build-xtask/artifacts/latest/firmware-emu "$TARGET"
+ TARGET="core/build/artifacts/latest/trezor-emu-core-${{ inputs.model }}-v${{ inputs.version }}${{ inputs.binary-suffix }}"
+ mv core/build/artifacts/latest/firmware-emu "$TARGET"
echo "binary_path=$TARGET" >> "$GITHUB_OUTPUT"
shell: sh
@@ -54,6 +54,6 @@ runs:
with:
name: ${{ inputs.artifact-name }}
path: |
- core/build-xtask/artifacts/latest/trezor-emu-core*
- core/build-xtask/artifacts/latest/bootloader-emu
+ core/build/artifacts/latest/trezor-emu-core*
+ core/build/artifacts/latest/bootloader-emu
retention-days: 7
### .github/workflows/core-hw.yml
@@ -97,7 +97,7 @@ jobs:
nix-shell --arg hardwareTest true --run uhubctl || true
nix-shell --arg hardwareTest true --run "uv run core/tools/check-usb-permissions.py" |& tee check-usb-permissions.log
- run: nix-shell --run "uv run make -C core build_firmware"
- - run: nix-shell --arg hardwareTest true --run "uv run python ci/hardware_tests/bootstrap.py \"$TREZOR_MODEL\" core/build-xtask/artifacts/latest/firmware.bin"
+ - run: nix-shell --arg hardwareTest true --run "uv run python ci/hardware_tests/bootstrap.py \"$TREZOR_MODEL\" core/build/artifacts/latest/firmware.bin"
- run: |
nix-shell --run "uv run trezorctl list"
nix-shell --run "uv run trezorctl get-features"
@@ -148,7 +148,7 @@ jobs:
full-deps: "true"
- run: nix-shell --arg hardwareTest true --run uhubctl
- run: nix-shell --run "uv run make -C core build_firmware"
- - run: nix-shell --arg hardwareTest true --run "uv run python ci/hardware_tests/bootstrap.py \"$TREZOR_MODEL\" core/build-xtask/artifacts/latest/firmware.bin"
+ - run: nix-shell --arg hardwareTest true --run "uv run python ci/hardware_tests/bootstrap.py \"$TREZOR_MODEL\" core/build/artifacts/latest/firmware.bin"
- run: nix-shell --run "uv run trezorctl list"
- run: nix-shell --run "uv run trezorctl get-features"
- run: |
### .github/workflows/core.yml
@@ -109,27 +109,27 @@ jobs:
- if: matrix.coins == 'universal' && matrix.type != 'debuglink'
run: |
nix-shell --run "uv run make -C core build_boardloader"
- nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build-xtask/artifacts/latest/boardloader.bin"
+ nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build/artifacts/latest/boardloader.bin"
nix-shell --run "uv run make -C core build_bootloader"
- nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build-xtask/artifacts/latest/bootloader.bin"
+ nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build/artifacts/latest/bootloader.bin"
nix-shell --run "uv run make -C core build_prodtest"
- nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build-xtask/artifacts/latest/prodtest.bin"
+ nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build/artifacts/latest/prodtest.bin"
- run: nix-shell --run "uv run make -C core build_bootloader_ci"
if: matrix.coins == 'universal' && matrix.type != 'debuglink' && matrix.model == 'T2T1'
- run: |
nix-shell --run "uv run make -C core build_firmware"
- nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build-xtask/artifacts/latest/firmware.bin"
+ nix-shell --run "uv run ./tools/check-insecure-prng.py --absent core/build/artifacts/latest/firmware.bin"
- run: nix-shell --run "uv run ./tools/print-rust-stack-sizes.py | sort -k1 -n | tail -n 50"
# - run: nix-shell --run "uv run ./tools/print-rust-type-sizes.sh core/build/firmware/rust-type-sizes.log" | awk '$1 >= 1000' | sort -k1 -n
- - run: nix-shell --run "uv run ./tools/check-bitcoin-only core/build-xtask/artifacts/latest/firmware.bin"
+ - run: nix-shell --run "uv run ./tools/check-bitcoin-only core/build/artifacts/latest/firmware.bin"
if: matrix.coins == 'btconly' && matrix.type != 'debuglink'
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
name: core-firmware-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}${{ matrix.miniscript && '-miniscript' || '' }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
- core/build-xtask/artifacts/latest/*.bin
- core/build-xtask/artifacts/latest/*.elf
- core/build-xtask/artifacts/pub/*
+ core/build/artifacts/latest/*.bin
+ core/build/artifacts/latest/*.elf
+ core/build/artifacts/pub/*
retention-days: 7
core_emu:
@@ -177,16 +177,16 @@ jobs:
- run: nix-shell --run "uv run make -C core build_bootloader_emu"
if: matrix.coins == 'universal' && matrix.asan == 'noasan'
- run: nix-shell --run "uv run make -C core build_unix_frozen"
- - run: nix-shell --run "uv run ./tools/check-insecure-prng.py --present --model $TREZOR_MODEL core/build-xtask/artifacts/latest/firmware-emu"
+ - run: nix-shell --run "uv run ./tools/check-insecure-prng.py --present --model $TREZOR_MODEL core/build/artifacts/latest/firmware-emu"
- run: nix-shell --run "uv run make -C core test_emu_sanity"
- - run: cp core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.miniscript && '-miniscript' || '' }}${{ matrix.n1w1 && '-n1w1' || '' }}
+ - run: cp core/build/artifacts/latest/firmware-emu core/build/artifacts/latest/firmware-emu-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.miniscript && '-miniscript' || '' }}${{ matrix.n1w1 && '-n1w1' || '' }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.miniscript && '-miniscript' || '' }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
- core/build-xtask/artifacts/latest/firmware-emu*
- core/build-xtask/artifacts/latest/bootloader-emu
- core/build-xtask/artifacts/latest/mpy-files/**/*.i
+ core/build/artifacts/latest/firmware-emu*
+ core/build/artifacts/latest/bootloader-emu
+ core/build/artifacts/latest/mpy-files/**/*.i
retention-days: 7
core_emu_arm:
@@ -224,13 +224,13 @@ jobs:
- run: nix-shell --run "uv run make -C core build_bootloader_emu"
if: matrix.coins == 'universal'
- run: nix-shell --run "uv run make -C core build_unix_frozen"
- - run: mv core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-arm-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n1w1 && '-n1w1' || '' }}
+ - run: mv core/build/artifacts/latest/firmware-emu core/build/artifacts/latest/firmware-emu-arm-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n1w1 && '-n1w1' || '' }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
name: core-emu-arm-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
- core/build-xtask/artifacts/latest/firmware-emu*
- core/build-xtask/artifacts/latest/bootloader-emu
+ core/build/artifacts/latest/firmware-emu*
+ core/build/artifacts/latest/bootloader-emu
retention-days: 2
prodtest_emu:
@@ -259,7 +259,7 @@ jobs:
with:
name: prodtest-emu-${{ matrix.model }}
path: |
- core/build-xtask/artifacts/${{ matrix.model }}/prodtest-emu
+ core/build/artifacts/${{ matrix.model }}/prodtest-emu
retention-days: 7
- name: Run prodtest device tests
run: nix-shell --run "uv run make -C core test_emu_prodtest"
@@ -336,8 +336,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run core/emu.py --headless -q --temporary-profile --slip0014 --command cargo test --manifest-path rust/trezor-client/Cargo.toml"
@@ -388,8 +388,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-debuglink-${{ matrix.asan }}${{ matrix.miniscript && '-miniscript' || '' }}${{ matrix.n1w1 && '-n1w1' || '' }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- name: Run device tests
if: ${{ env.STABLE_FEATURES == 'true' }}
@@ -443,8 +443,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run make -C core test_emu_click_ui_multicore"
if: ${{ matrix.asan == 'noasan' }}
@@ -494,8 +494,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
with:
full-deps: "true"
@@ -535,8 +535,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run make -C core test_emu_persistence_ui"
if: ${{ matrix.asan == 'noasan' }}
@@ -576,13 +576,13 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
with:
full-deps: "true"
- run: nix-shell --run "git clone --depth=1 https://github.com/bitcoin-core/HWI.git"
- - run: nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build-xtask/artifacts/latest/firmware-emu bitcoind"
+ - run: nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build/artifacts/latest/firmware-emu bitcoind"
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
name: core-test-hwi-${{ matrix.model }}
@@ -637,9 +637,9 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-firmware-${{ matrix.model }}-universal-normal # FIXME: s/normal/debuglink/
- path: core/build-xtask/artifacts
+ path: core/build/artifacts
- uses: ./.github/actions/environment
- - run: nix-shell --run "uv run core/tools/size/checker.py core/build-xtask/artifacts/latest/firmware.elf"
+ - run: nix-shell --run "uv run core/tools/size/checker.py core/build/artifacts/latest/firmware.elf"
# Monero tests.
core_monero_test:
@@ -664,8 +664,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
with:
full-deps: "true"
@@ -704,8 +704,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run make -C tests/fido_tests/u2f-tests-hid"
- run: nix-shell --run "uv run make -C core test_emu_u2f"
@@ -740,8 +740,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run make -C core test_emu_fido2"
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
@@ -786,7 +786,7 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
- path: core/build-xtask/artifacts/latest
+ path: core/build/artifacts/latest
- uses: ./.github/actions/environment
# `make coverage` uses .i files downloaded above
- run: nix-shell --run "uv run make -C core coverage"
### .github/workflows/crowdin-ui-check-reuse.yml
@@ -44,8 +44,8 @@ jobs:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
- path: core/build-xtask/artifacts/latest
- - run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
+ path: core/build/artifacts/latest
+ - run: chmod +x core/build/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- run: nix-shell --run "uv run make -C core test_emu_multicore"
- run: tail -v -n50 tests/trezor*.log || true
### .github/workflows/crowdin-ui-check.yml
@@ -47,7 +47,7 @@ jobs:
with:
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
path: |
- core/build-xtask/artifacts/latest/firmware-emu*
+ core/build/artifacts/latest/firmware-emu*
retention-days: 7
# Context tests for Core. Generates screenshots of UI flows of curated list of tests
### AGENTS.md
@@ -27,7 +27,7 @@ Makefiles if in doubt; this file only captures what is non-obvious.
first use). `xtask build <project> -m <model>` — **`-m` is required**. Models: `T2T1`, `T2B1`, `T3B1`,
`T3T1`, `T3T2`, `T3W1`, discovery boards `D001`–`D003` (case-insensitive). The core Makefile defaults to
`TREZOR_MODEL=T3W1`. Projects: `firmware`, `bootloader`, `boardloader`, `prodtest`, `secmon`, ...
- Artifacts land in `core/build-xtask/artifacts/<MODEL>/`, symlinked as `artifacts/latest`.
+ Artifacts land in `core/build/artifacts/<MODEL>/`, symlinked as `artifacts/latest`.
- Emulator: `xtask build firmware --emulator -m <model> [-p <preset>]` (~1 min). Embedded: drop `--emulator`.
- **Build presets** (`-p <name>`, defined in `core/embed/xtask/presets.toml`, docs in `docs/core/build/xtask.md`).
CLI flags override presets (e.g. `-p test --frozen false`). Personal presets go in git-ignored
### build-docker.sh
@@ -353,27 +353,27 @@ for TREZOR_MODEL in ${MODELS[@]}; do
$GIT_CLEAN_REPO
rm -rf /build/*
uv run make clean vendor $MAKE_TARGETS QUIET_MODE=1
- for binary in build-xtask/artifacts/$TREZOR_MODEL/*.bin; do
+ for binary in build/artifacts/$TREZOR_MODEL/*.bin; do
uv run ../tools/check-insecure-prng.py --absent "\$binary"
done
for item in bootloader secmon kernel firmware prodtest; do
# Append the labeled fingerprint, preceded by '# <artifact name>'.
- if [ "\$item" != kernel ] && [ -s build-xtask/artifacts/$TREZOR_MODEL/\$item.bin ]; then
- src=\$(ls build-xtask/artifacts/pub/\$item-$TREZOR_MODEL*.bin 2>/dev/null | head -n1 || true)
+ if [ "\$item" != kernel ] && [ -s build/artifacts/$TREZOR_MODEL/\$item.bin ]; then
+ src=\$(ls build/artifacts/pub/\$item-$TREZOR_MODEL*.bin 2>/dev/null | head -n1 || true)
src=\${src##*/}
{
echo "# core${DIRSUFFIX}/\$item/\${src:-\$item.bin}"
uv run ../python/tools/firmware-fingerprint.py \
- build-xtask/artifacts/$TREZOR_MODEL/\$item.bin
+ build/artifacts/$TREZOR_MODEL/\$item.bin
echo
} >> /local/build/${COMMIT_HASH}.fingerprints
fi
- if [ -f build-xtask/artifacts/$TREZOR_MODEL/\$item.elf ]; then
+ if [ -f build/artifacts/$TREZOR_MODEL/\$item.elf ]; then
# copy only the artifacts to the build output directory
mkdir -p /build/\$item/
- gzip build-xtask/artifacts/$TREZOR_MODEL/\$item.elf
- cp -v build-xtask/artifacts/$TREZOR_MODEL/\$item* /build/\$item/
- pub_bin=(build-xtask/artifacts/pub/\$item-$TREZOR_MODEL-*.bin)
+ gzip build/artifacts/$TREZOR_MODEL/\$item.elf
+ cp -v build/artifacts/$TREZOR_MODEL/\$item* /build/\$item/
+ pub_bin=(build/artifacts/pub/\$item-$TREZOR_MODEL-*.bin)
if [ -f "\$pub_bin" ]; then
cp -v "\${pub_bin[@]}" /build/\$item/
fi # no pub bin for kernel, or for secmon when built only as a dependency
### core/Makefile
@@ -26,7 +26,7 @@
bloaty combine combine_fw upload upload_prodtest \
coverage unused
-BUILD_DIR = build-xtask/artifacts/latest
+BUILD_DIR = build/artifacts/latest
TREZOR_MODEL ?= T3W1
PYTEST_TIMEOUT ?= 500
### core/embed/.cargo/config.toml
@@ -1,5 +1,5 @@
[build]
-target-dir = "../build-xtask"
+target-dir = "../build"
#rustc-wrapper = "sccache"
[alias]
### core/embed/xbuild/src/helpers.rs
@@ -327,44 +327,44 @@ mod tests {
#[test]
fn locates_dirs_in_legacy_cross_layout() {
assert_dirs(
- "/repo/core/build-xtask/thumbv8m.main-none-eabihf/release/build/kernel-e281cbafac5dc040/out",
- "/repo/core/build-xtask/thumbv8m.main-none-eabihf/release",
- "/repo/core/build-xtask",
+ "/repo/core/build/thumbv8m.main-none-eabihf/release/build/kernel-e281cbafac5dc040/out",
+ "/repo/core/build/thumbv8m.main-none-eabihf/release",
+ "/repo/core/build",
);
}
#[test]
fn locates_dirs_in_layout_v2_cross() {
assert_dirs(
- "/repo/core/build-xtask/thumbv8m.main-none-eabihf/release/build/kernel/e281cbafac5dc040/out",
- "/repo/core/build-xtask/thumbv8m.main-none-eabihf/release",
- "/repo/core/build-xtask",
+ "/repo/core/build/thumbv8m.main-none-eabihf/release/build/kernel/e281cbafac5dc040/out",
+ "/repo/core/build/thumbv8m.main-none-eabihf/release",
+ "/repo/core/build",
);
}
#[test]
fn locates_dirs_in_legacy_host_layout() {
- let out_dir = Path::new("/repo/core/build-xtask/debug/build/xbuild-abcdef0123456789/out");
+ let out_dir = Path::new("/repo/core/build/debug/build/xbuild-abcdef0123456789/out");
assert_eq!(
cargo_profile_dir_from_out_dir(out_dir).unwrap(),
- PathBuf::from("/repo/core/build-xtask/debug")
+ PathBuf::from("/repo/core/build/debug")
);
assert_eq!(
cargo_target_dir_from_out_dir(out_dir, "aarch64-apple-darwin").unwrap(),
- PathBuf::from("/repo/core/build-xtask")
+ PathBuf::from("/repo/core/build")
);
}
#[test]
fn locates_dirs_in_layout_v2_host() {
- let out_dir = Path::new("/repo/core/build-xtask/debug/build/xbuild/abcdef0123456789/out");
+ let out_dir = Path::new("/repo/core/build/debug/build/xbuild/abcdef0123456789/out");
assert_eq!(
cargo_profile_dir_from_out_dir(out_dir).unwrap(),
- PathBuf::from("/repo/core/build-xtask/debug")
+ PathBuf::from("/repo/core/build/debug")
);
assert_eq!(
cargo_target_dir_from_out_dir(out_dir, "aarch64-apple-darwin").unwrap(),
- PathBuf::from("/repo/core/build-xtask")
+ PathBuf::from("/repo/core/build")
);
}
}
### core/embed/xtask/src/artifacts.rs
@@ -62,7 +62,7 @@ fn copy_if_newer(src: &Path, dst: &Path) -> Result<bool> {
Ok(true)
}
-/// Collects build artifacts into `build-xtask/artifacts/{MODEL_ID}/`.
+/// Collects build artifacts into `build/artifacts/{MODEL_ID}/`.
/// When `is_dependency` is true, the `.bin` file is skipped (only ELF, MAP,
/// and compile_commands are collected).
pub fn collect_artifacts(args: &ResolvedBuildArgs, is_dependency: bool) -> Result<()> {
### core/emu.py
@@ -25,7 +25,7 @@
HERE = Path(__file__).resolve().parent
-MICROPYTHON = HERE / "build-xtask" / "artifacts" / "latest" / "firmware-emu"
+MICROPYTHON = HERE / "build" / "artifacts" / "latest" / "firmware-emu"
TROPIC_MODEL_CONFIG = (
HERE.parent / "tests" / "tropic_model" / "firmware_config" / "current.yml"
)
### core/tests/run_tests.sh
@@ -3,7 +3,7 @@
declare -a results
declare -i passed=0 failed=0 exit_code=0
declare COLOR_GREEN='\e[32m' COLOR_RED='\e[91m' COLOR_RESET='\e[39m'
-declare MICROPYTHON="${MICROPYTHON:-../build-xtask/artifacts/latest/firmware-emu -X heapsize=2M}"
+declare MICROPYTHON="${MICROPYTHON:-../build/artifacts/latest/firmware-emu -X heapsize=2M}"
export SDL_VIDEODRIVER=dummy
print_summary() {
### core/tools/coverage-collect.py
@@ -12,7 +12,7 @@
def to_preprocessed_path(py_path: Path) -> Path:
- # Remap <prefix>/src/<rel>.py → <prefix>/build-xtask/artifacts/latest/mpy-files/<rel>.i
+ # Remap <prefix>/src/<rel>.py → <prefix>/build/artifacts/latest/mpy-files/<rel>.i
# so coverage reports against the preprocessed source actually compiled into the frozen
# build (dead feature-flag branches already rewritten to `if False:`).
# Fall back to the original .py path when no .i exists (e.g. unfrozen
@@ -25,7 +25,7 @@ def to_preprocessed_path(py_path: Path) -> Path:
rest = path_parts[src_index + 1 :]
i_path = (
Path(*prefix)
- / "build-xtask/artifacts/latest/mpy-files"
+ / "build/artifacts/latest/mpy-files"
/ Path(*rest).with_suffix(".i")
)
return i_path if os.path.exists(i_path) else py_path
### docs/core/build/xtask.md
@@ -215,7 +215,7 @@ CLI flags always win over presets.
## Build artifacts
-Everything is placed under cargo's target directory (`core/build-xtask/` by
+Everything is placed under cargo's target directory (`core/build/` by
default), referred to here as `build/`.
### Folder layout
### python/src/trezorlib/_internal/prodtest_emulator.py
@@ -198,7 +198,7 @@ def _find_prodtest_emulator(model: str | None) -> Path:
If *model* is None, use the ``latest`` symlink (``xtask build prodtest
--latest``), mirroring the convention in ``tests/emulators.py``.
"""
- artifacts = ROOT / "core" / "build-xtask" / "artifacts"
+ artifacts = ROOT / "core" / "build" / "artifacts"
if model is None:
path = artifacts / "latest" / "prodtest-emu"
### tbench.toml
@@ -3,6 +3,6 @@
[paths]
cargo-workspace = "core/embed"
debug-templates = "core/embed/xtask/tbench/debug"
-build-artifacts = "core/build-xtask/artifacts"
+build-artifacts = "core/build/artifacts"
xtask-presets = "core/embed/xtask"
manifest = "core/embed/xtask/tbench/manifest.yaml"
### tests/emulators.py
@@ -32,7 +32,7 @@
BINDIR = ROOT / "tests" / "emulators"
LOCAL_BUILD_PATHS = {
- "core": ROOT / "core" / "build-xtask" / "artifacts" / "latest" / "firmware-emu",
+ "core": ROOT / "core" / "build" / "artifacts" / "latest" / "firmware-emu",
"legacy": ROOT / "legacy" / "firmware" / "trezor.elf",
}
### tests/prodtest_tests/conftest.py
@@ -171,7 +171,7 @@ def client(
The model is resolved in order:
1. --prodtest-model CLI option
2. TREZOR_MODEL environment variable
- 3. 'latest' symlink under core/build-xtask/artifacts/latest/prodtest-emu
+ 3. 'latest' symlink under core/build/artifacts/latest/prodtest-emu
"""
model = request.config.getoption("prodtest_model") or None
### tools/print-rust-stack-sizes.py
@@ -11,7 +11,7 @@
ROOT = Path(__file__).parent.parent.resolve()
-FIRMWARE_ELF = ROOT / "core" / "build-xtask" / "artifacts" / "latest" / "firmware.elf"
+FIRMWARE_ELF = ROOT / "core" / "build" / "artifacts" / "latest" / "firmware.elf"
def load_address_map(elf_file: Path) -> dict[int, str]:Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.