|
1 | 1 | name: Setup Benchmark Environment |
2 | | -description: Install Nix, build home-manager generation, and set up fish shell environment for benchmarking |
| 2 | +description: Install Nix, build home-manager generation, and set up zsh shell environment for benchmarking |
3 | 3 |
|
4 | 4 | outputs: |
5 | 5 | hm_gen: |
|
29 | 29 | # - /etc/zprofile: remove path_helper (slow PATH construction) |
30 | 30 | # - /etc/zshrc: remove compinit/promptinit (nix-darwin sets enableGlobalCompInit=false) |
31 | 31 | # - /etc/zshenv: keep Nix daemon setup for PATH |
32 | | - # See hosts/common/default.nix:19-23 |
| 32 | + # See hosts/common/default.nix for the matching nix-darwin zsh settings. |
33 | 33 | sudo sh -c ' |
34 | 34 | echo "" > /etc/zprofile |
35 | 35 | echo "" > /etc/zshrc |
|
39 | 39 | sudo mkdir -p /Users/t1190078 |
40 | 40 | sudo chown "$(whoami)" /Users/t1190078 |
41 | 41 |
|
| 42 | + # Symlink user-level zsh dotfiles |
| 43 | + ln -sf "$HM_GEN/home-files/.zshrc" ~/.zshrc |
| 44 | + ln -sf "$HM_GEN/home-files/.zshenv" ~/.zshenv |
| 45 | + ln -sf "$HM_GEN/home-files/.zprofile" ~/.zprofile |
| 46 | +
|
42 | 47 | # Symlink .config directories |
43 | 48 | mkdir -p ~/.config |
44 | 49 | for item in "$HM_GEN/home-files/.config/"*; do |
|
51 | 56 | export PATH="$HM_GEN/home-path/bin:$PATH" |
52 | 57 | echo "$HM_GEN/home-path/bin" >> "$GITHUB_PATH" |
53 | 58 |
|
| 59 | + # Pre-populate sheldon cache (first run clones plugins via git) |
| 60 | + mkdir -p ~/.cache/sheldon |
| 61 | + sheldon lock |
| 62 | + sheldon source > ~/.cache/sheldon/sheldon.zsh |
| 63 | + readlink ~/.config/sheldon/plugins.toml > ~/.cache/sheldon/sheldon.zsh.lock |
| 64 | +
|
54 | 65 | # Warm the mise cache BEFORE benchmarking so we measure realistic |
55 | | - # warm-start behaviour. Otherwise `mise hook-env` (run from fish's |
56 | | - # activation hook on every startup) resolves the dynamic `latest`/`lts` |
| 66 | + # warm-start behaviour. Otherwise shell activation can resolve dynamic `latest`/`lts` |
57 | 67 | # tool versions over the GitHub API inside the measured region, adding |
58 | 68 | # 100s of ms of nondeterministic noise that trips the 150% alert. |
59 | 69 | # `mise install` lays down the tools so hook-env never touches the |
|
0 commit comments