Skip to content

Commit 4b64c73

Browse files
committed
Tup refactor - wrapup
ci/build/dev.sh: ci/test/python-recorder-smoke.sh: ci/test/ui-tests.sh: justfile: Signed-off-by: Tzanko Matev <[email protected]>
1 parent 04cd122 commit 4b64c73

File tree

5 files changed

+27
-31
lines changed

5 files changed

+27
-31
lines changed

ci/build/dev.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,3 @@ TUP_OUTPUT_SCRIPT=tup-generated-build-once.sh
3131
tup generate --config build-debug/tup.config "$TUP_OUTPUT_SCRIPT"
3232
./"$TUP_OUTPUT_SCRIPT"
3333
rm "$TUP_OUTPUT_SCRIPT"
34-
35-
# Running the generated script populates the staging tree; clean it so that
36-
# subsequent `tup` invocations (locally or in CI) can start from a fresh slate.
37-
git clean -fx .
38-
39-
popd
40-
41-
pushd src/build-debug
42-
git clean -fx .
43-
popd

ci/test/python-recorder-smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ echo '##########################################################################
1111

1212
nix develop .#devShells.x86_64-linux.default --command ./ci/build/dev.sh
1313

14-
CT_BIN="${ROOT_DIR}/src/bin/ct"
14+
CT_BIN="${ROOT_DIR}/src/build/bin/ct"
1515
if [[ ! -x "${CT_BIN}" ]]; then
1616
echo "error: ${CT_BIN} not found after build"
1717
exit 1

ci/test/ui-tests.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ echo '##########################################################################
66
echo 'Running ui e2e playwright tests'
77
echo '###############################################################################'
88

9-
# TODO: maybe pass the result from the build stage as artifact to this job?
10-
# TODO: tup generate seems problematic with variants: we need to fix/change the resulting dirs to work correctly
11-
# ./ci/build/dev.sh
9+
./ci/build/dev.sh
1210

1311
# trying to make it work with the nix build, instead of the tup build:
1412

@@ -25,10 +23,20 @@ echo '##########################################################################
2523

2624
# ./ci/build/nix.sh
2725

28-
# CODETRACER_E2E_CT_PATH="$(pwd)/result/bin/ct"
29-
# export CODETRACER_E2E_CT_PATH
26+
CODETRACER_E2E_CT_PATH="$(pwd)/src/build/bin/ct"
27+
LINKS_PATH_DIR="$(pwd)/src/build"
28+
NIX_CODETRACER_EXE_DIR="$(pwd)/src/build"
29+
CODETRACER_LINKS_PATH="$(pwd)/src/build"
3030

31-
# pushd ui-tests
32-
# nix develop --command ./ci.sh
31+
export CODETRACER_E2E_CT_PATH
32+
export LINKS_PATH_DIR
33+
export NIX_CODETRACER_EXE_DIR
34+
export CODETRACER_LINKS_PATH
3335

34-
# popd
36+
pushd ui-tests
37+
nix develop --command ./ci.sh
38+
39+
popd
40+
41+
git clean -fx ./src/build
42+
git clean -fx ./src/build-debug

justfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ build:
1414
# build-debug/codetracer user-setup
1515

1616
# Start building continuously
17-
cd src/build
17+
cd src
1818
tup build-debug
1919
tup monitor -a
20-
cd ../..
20+
cd ..
2121

2222
# start webpack
2323
node_modules/.bin/webpack --watch --progress & # building frontend_bundle.js
@@ -32,20 +32,20 @@ build-once:
3232
# We have to make the dist directory here, because it's missing on a fresh check out
3333
# It will be created by the webpack command below, but we have an a chicken and egg
3434
# problem because the Tupfiles refer to it.
35-
mkdir public/dist
35+
mkdir -p src/public/dist
3636

37-
cd src/build
37+
cd src
3838
tup build-debug
39-
cd ../..
39+
cd ..
4040

4141
# Build frontend_bundle.js in the dist folder
4242
node_modules/.bin/webpack --progress
4343

4444
# We need to execute another tup run because webpack may have created some new files
4545
# that tup will discover
46-
cd src/build
46+
cd src
4747
tup build-debug
48-
cd ../..
48+
cd ..
4949

5050
build-docs:
5151
#!/usr/bin/env bash

tup-build-staging-status.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
- Standardized on per-file `SRC_DIR` handling for relocated Tupfiles, added `!cp_preserve` plus `src/build/.gitignore`, and refreshed `.agents/codebase-insights.txt`; no further Tupfile edits are planned.
66
- Validated the build: both `tup` and `tup generate` succeed, `just build` / `just build-once` work end-to-end, and their outputs land under `src/build/` or `src/build-debug/build/` as intended.
77
- Aligned developer tooling (Just recipes, CI helpers, Nix shells, non-Nix env scripts) and documentation—including contributor guides, mdBook outputs, and WebDriver specs—with the `src/build/` staging root and the new `build-debug/build` artifact paths, and documented the required clean-up after running generated scripts.
8-
9-
## In Progress
10-
- Monitor developer tooling and CI jobs for regressions now that their scripts target `src/build/` and `src/build-debug/build/**`; collect feedback from early adopters before marking ADR 0006 as accepted.
8+
- Confirmed the updated workflows by exercising the key entry points (`tup build`, `tup build-debug`, `tup generate` + generated script, `just build`, `just build-once`) after the clean-up procedure; no regressions observed.
119

1210
## Next
13-
- Verify CI and developer tooling run successfully with the updated paths and documented clean-up, then mark ADR 0006 as accepted.
14-
- Capture any follow-up automation needed to enforce the post-`tup.sh` cleaning workflow (e.g., pre-commit hooks or CI guardrails) based on user feedback.
11+
- Mark ADR 0006 as **Accepted**, close out this implementation plan, and communicate the finalized workflow (including the `tup generate` clean-up) to the wider team.
12+
- Monitor for feedback over the next sprint and decide whether additional automation is needed to enforce the post-`tup.sh` cleaning steps.

0 commit comments

Comments
 (0)