-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
185 lines (162 loc) · 6.64 KB
/
Copy pathTaskfile.yml
File metadata and controls
185 lines (162 loc) · 6.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# Taskfile.yml - build, test, and run Codegeist OS outputs.
#
# Build tasks delegate directly to the classic attributes in default.nix. The
# primary build is the payload-free GNOME installer ISO. Calamares downloads the
# GGUF into the installed target. The paired Geist wrapper
# has a cheap argument-contract test in addition to the bootstrap and installer
# tests. Composite workflows serialize classic nix-build clients because
# concurrent clients can trigger an internal worker assertion in the single-user
# Nix store. Bootstrap VM tasks keep separate mutable QEMU state, and VNC binds
# only to localhost by default. Installer tests always discard their previous
# automated VM, probe, output, and driver state first. clean removes only build
# links, while reset tasks explicitly remove mutable state.
#
# Related files:
# - default.nix
# - scripts/record-installer-demo.sh
# - docs/feature-demos.md
# - nix/profiles/x86_64-install-iso.nix
# - nix/profiles/x86_64-vm.nix
# - nix/tests/bootstrap.nix
# - nix/tests/installer.nix
version: '3'
vars:
TARGET_DIR: target
PACKAGE_RESULT: target/codegeist
GEIST_RESULT: target/geist
ISO_RESULT: target/iso
VM_RESULT: target/vm
VM_VNC_RESULT: target/vm-vnc
TEST_RESULT: target/test
GEIST_WRAPPER_TEST_RESULT: target/test-geist-wrapper
INSTALLER_DRIVER_RESULT: target/installer-driver
INSTALLER_VNC_OUTPUT_DIR: target/installer-vnc-output
INSTALLER_VNC_STATE_DIR: target/vm-state/installer-vnc
INSTALLER_PROBE_DIR: target/installer-probe-run
INSTALLER_DEMO_DIR: target/installer-demo
INSTALLER_DEMO_GIF: docs/assets/installer/codegeist-os-installer.gif
VM_STATE_DIR: target/vm-state/headless
VM_VNC_STATE_DIR: target/vm-state/vnc
VNC_DISPLAY: 127.0.0.1:0
tasks:
default:
desc: List available Codegeist OS tasks
cmds:
- task --list
silent: true
prepare-target:
internal: true
cmds:
- mkdir -p {{.TARGET_DIR}}
status:
- test -d {{.TARGET_DIR}}
package:
aliases: [build-package]
desc: Build the pinned x86_64 Codegeist package
deps: [prepare-target]
cmds:
- nix-build -A packages.x86_64.codegeist --out-link "$PWD/{{.PACKAGE_RESULT}}"
geist:
aliases: [build-geist]
desc: Build the x86_64 Geist identity wrapper
deps: [prepare-target]
cmds:
- nix-build -A packages.x86_64.geist --out-link "$PWD/{{.GEIST_RESULT}}"
iso:
aliases: [build-iso]
desc: Build the payload-free x86_64 GNOME Calamares installer ISO
deps: [prepare-target]
cmds:
- nix-build -A images.x86_64.iso --out-link "$PWD/{{.ISO_RESULT}}"
vm:
aliases: [build-vm]
desc: Build the x86_64 UEFI VM runner
deps: [prepare-target]
cmds:
- nix-build -A images.x86_64.vm --out-link "$PWD/{{.VM_RESULT}}"
vm-vnc:
aliases: [build-vm-vnc]
desc: Build the graphics-enabled x86_64 UEFI VM runner
deps: [prepare-target]
cmds:
- nix-build -A images.x86_64.vmVnc --out-link "$PWD/{{.VM_VNC_RESULT}}"
build-bootstrap:
desc: Build Codegeist, Geist, and both bootstrap UEFI VM runners
cmds:
- task: package
- task: geist
- task: vm
- task: vm-vnc
build:
desc: Build the payload-free x86_64 GNOME Calamares installer ISO
deps: [iso]
test-bootstrap:
desc: Build and run the automated x86_64 UEFI bootstrap test
deps: [prepare-target]
cmds:
- nix-build -A tests.x86_64.bootstrap --out-link "$PWD/{{.TEST_RESULT}}"
test-geist-wrapper:
desc: Verify Geist joins all arguments into one Codegeist ask prompt
deps: [prepare-target]
cmds:
- nix-build -A tests.x86_64.geistWrapper --out-link "$PWD/{{.GEIST_WRAPPER_TEST_RESULT}}"
clean-installer-test:
internal: true
deps: [prepare-target]
cmds:
- rm -rf {{.INSTALLER_VNC_STATE_DIR}} {{.INSTALLER_VNC_OUTPUT_DIR}} {{.INSTALLER_PROBE_DIR}}
- rm -f {{.INSTALLER_DRIVER_RESULT}}
test-installer:
desc: Install the production ISO visibly and verify real local inference
cmds:
- task: clean-installer-test
- nix-build -A tests.x86_64.installerDriver --out-link "$PWD/{{.INSTALLER_DRIVER_RESULT}}"
- mkdir -p {{.INSTALLER_VNC_STATE_DIR}} {{.INSTALLER_VNC_OUTPUT_DIR}}
- INSTALLER_DRIVER="$PWD/{{.INSTALLER_DRIVER_RESULT}}/bin/nixos-test-driver" INSTALLER_VNC_STATE_DIR="$PWD/{{.INSTALLER_VNC_STATE_DIR}}" INSTALLER_VNC_OUTPUT_DIR="$PWD/{{.INSTALLER_VNC_OUTPUT_DIR}}" ./scripts/run-installer-smoke.sh
interactive: true
record-installer-demo:
desc: Record the full installer MP4 locally and refresh the README GIF
cmds:
- task: clean-installer-test
- rm -rf {{.INSTALLER_DEMO_DIR}}
- nix-build -A tests.x86_64.installerDriver --out-link "$PWD/{{.INSTALLER_DRIVER_RESULT}}"
- mkdir -p {{.INSTALLER_VNC_STATE_DIR}} {{.INSTALLER_VNC_OUTPUT_DIR}} {{.INSTALLER_DEMO_DIR}}
- INSTALLER_DRIVER="$PWD/{{.INSTALLER_DRIVER_RESULT}}/bin/nixos-test-driver" INSTALLER_DEMO_DIR="$PWD/{{.INSTALLER_DEMO_DIR}}" INSTALLER_VNC_STATE_DIR="$PWD/{{.INSTALLER_VNC_STATE_DIR}}" INSTALLER_VNC_OUTPUT_DIR="$PWD/{{.INSTALLER_VNC_OUTPUT_DIR}}" INSTALLER_DEMO_GIF="$PWD/{{.INSTALLER_DEMO_GIF}}" ./scripts/record-installer-demo.sh
test:
desc: Run the wrapper, bootstrap, and graphical installer tests
cmds:
- task: test-geist-wrapper
- task: test-bootstrap
- task: test-installer
check:
desc: Build the installer and bootstrap outputs and run all tests
cmds:
- task: build
- task: build-bootstrap
- task: test
start:
desc: Build and start the UEFI VM without login credentials
cmds:
- task: vm
- mkdir -p {{.VM_STATE_DIR}}
- NIX_DISK_IMAGE=./{{.VM_STATE_DIR}}/codegeist-os.qcow2 NIX_EFI_VARS=./{{.VM_STATE_DIR}}/codegeist-os-efi-vars.fd exec ./{{.VM_RESULT}}/bin/run-codegeist-os-vm {{.CLI_ARGS}}
interactive: true
start-vnc:
desc: Build and start the UEFI VM with localhost VNC on port 5900
cmds:
- task: vm-vnc
- mkdir -p {{.VM_VNC_STATE_DIR}}
- NIX_DISK_IMAGE=./{{.VM_VNC_STATE_DIR}}/codegeist-os.qcow2 NIX_EFI_VARS=./{{.VM_VNC_STATE_DIR}}/codegeist-os-efi-vars.fd exec ./{{.VM_VNC_RESULT}}/bin/run-codegeist-os-vm -display vnc={{.VNC_DISPLAY}} {{.CLI_ARGS}}
interactive: true
reset-vm-state:
desc: Delete the mutable VM disk and EFI variable state
cmds:
- rm -rf {{.TARGET_DIR}}/vm-state
clean:
desc: Remove nix-build result links while preserving VM state
cmds:
- rm -f {{.PACKAGE_RESULT}} {{.GEIST_RESULT}} {{.ISO_RESULT}} {{.VM_RESULT}} {{.VM_VNC_RESULT}} {{.TEST_RESULT}} {{.GEIST_WRAPPER_TEST_RESULT}} {{.INSTALLER_DRIVER_RESULT}}
clean-all:
desc: Remove the complete generated target directory
cmds:
- rm -rf {{.TARGET_DIR}}