|
90 | 90 | - name: API discipline |
91 | 91 | run: go run ./tools/apicheck ./ui ./components ./app ./gfx |
92 | 92 |
|
| 93 | + # The attribute rules (ADR 0089 stage 3) exist only in the dev build: they |
| 94 | + # report a generic attribute that an element cannot use instead of letting it |
| 95 | + # be silently ignored. The release build must not carry the rules or their |
| 96 | + # messages, so this job tests the dev variant and proves the release one has |
| 97 | + # neither. |
| 98 | + dev-attributes: |
| 99 | + needs: changes |
| 100 | + if: needs.changes.outputs.code == 'true' |
| 101 | + runs-on: ubuntu-latest |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v4 |
| 104 | + - uses: actions/setup-go@v5 |
| 105 | + with: |
| 106 | + go-version-file: go.mod |
| 107 | + cache: true |
| 108 | + - name: vet the dev build |
| 109 | + run: go vet -tags dev ./... |
| 110 | + - name: test the dev build |
| 111 | + run: go test -tags dev ./base ./ui ./components -count=1 |
| 112 | + - name: prove the release build has no attribute rules |
| 113 | + run: | |
| 114 | + if go list -f '{{.GoFiles}}' ./base | grep -q attrcheck_dev.go; then |
| 115 | + echo "the release build compiles the dev attribute rules" >&2 |
| 116 | + exit 1 |
| 117 | + fi |
| 118 | + go build -o /tmp/base-release.a ./base |
| 119 | + if grep -aq 'does not support' /tmp/base-release.a; then |
| 120 | + echo "the release build carries the dev attribute messages" >&2 |
| 121 | + exit 1 |
| 122 | + fi |
| 123 | + go build -tags dev -o /tmp/base-dev.a ./base |
| 124 | + if ! grep -aq 'does not support' /tmp/base-dev.a; then |
| 125 | + echo "the dev build does not carry the attribute rules" >&2 |
| 126 | + exit 1 |
| 127 | + fi |
| 128 | +
|
93 | 129 | # Every target Viva ships for must at least type-check, tests included. The |
94 | 130 | # targets do not depend on each other, so they run at the same time on one |
95 | 131 | # runner: asking for four runners to do what one can finish in the same minute |
@@ -125,14 +161,21 @@ jobs: |
125 | 161 | # The Linux package is not part of the sharded run (it drives X11), so the |
126 | 162 | # titlebar contracts that do not need a server name their tests here. |
127 | 163 | - name: Titlebar and window contracts |
128 | | - run: go test ./internal/platform/linux -run '^TestMaximizeButtonSetsBothDirections$' -count=1 -v |
| 164 | + run: go test ./internal/platform/linux -run '^Test(MaximizeButtonSetsBothDirections|PreviewMovePreservesSizeAndFocus)$' -count=1 -v |
| 165 | + - name: Native X11 drag preview |
| 166 | + env: |
| 167 | + VIVA_TEST_PREVIEW_XVFB: '1' |
| 168 | + run: | |
| 169 | + sudo apt-get install -y xvfb libxcb-shape0 || |
| 170 | + { sudo apt-get update && sudo apt-get install -y xvfb libxcb-shape0; } |
| 171 | + xvfb-run -a go test ./internal/platform/linux -run '^TestPreviewNativeX11Contract$' -count=1 -v |
129 | 172 | - name: Native X11 global shortcut |
130 | 173 | env: |
131 | 174 | VIVA_NATIVE_GLOBAL_SHORTCUT_TEST: '1' |
132 | 175 | run: | |
133 | 176 | sudo apt-get install -y xvfb xdotool libx11-xcb1 || |
134 | 177 | { sudo apt-get update && sudo apt-get install -y xvfb xdotool libx11-xcb1; } |
135 | | - xvfb-run -a go test ./internal/platform/linux -run '^TestNativeX11GlobalShortcut$' -count=1 -v |
| 178 | + xvfb-run -a go test ./internal/platform/linux -run '^TestNativeX11(GlobalShortcut|WindowIconPropertyUpdates)$' -count=1 -v |
136 | 179 |
|
137 | 180 | # The browser target is a release target: it compiles every package, runs the |
138 | 181 | # shared tests under GOOS=js, and builds the browser entry points and a guide. |
@@ -304,6 +347,8 @@ jobs: |
304 | 347 | run: go test ./internal/platform/windows ./ui ./components ./headless ./app -run 'Test(Backdrop|WindowBackdrop|Notification|TaskbarCreated|CompositionClear|CompositionFallback|CompositionCreation|CustomBackdrop|AcrylicAccent|LegacyAcrylic|RoundedOutline|Translucent|MonospaceFamilies|FontWeights|(The)?MonoWeights|(The)?InterfaceWeights|EveryListedFamilyResolves|EngineReportsTheFontsUnderline|AlwaysOnTop|SaveDialogCheckbox|FileIcon|NativeStructureABI|ResizePresents|WindowSwapChain|LiveResize|FlipWindowResize|RedrawWaits|ContinuousRedraw|NoOpFrame|SameSize|ZeroSize|ResizeTimer|RedrawQueue|NativeRedrawMessage|CompositionSupersededFrame|DragPreview)' -count=1 -v |
305 | 348 | - name: Terminal keyboard routing |
306 | 349 | run: go test ./internal/platform/windows -run '^TestATerminalGetsEditingKeysAndChordsAsRawKeys$' -count=1 -v |
| 350 | + - name: Native window and grouped taskbar icons |
| 351 | + run: go test ./internal/platform/windows -run '^TestWindowIconUpdatesOnTheWindowThread$' -count=1 -v |
307 | 352 | - name: Native Windows global shortcut |
308 | 353 | env: |
309 | 354 | VIVA_NATIVE_GLOBAL_SHORTCUT_TEST: '1' |
@@ -372,7 +417,7 @@ jobs: |
372 | 417 | passed: |
373 | 418 | name: ci passed |
374 | 419 | if: always() |
375 | | - needs: [changes, lint, cross-vet, web, web-browser, test, darwin, windows-materials, windows-arm64-text, benchmarks] |
| 420 | + needs: [changes, lint, dev-attributes, cross-vet, web, web-browser, test, darwin, windows-materials, windows-arm64-text, benchmarks] |
376 | 421 | runs-on: ubuntu-latest |
377 | 422 | steps: |
378 | 423 | - name: every job this change needed passed |
|
0 commit comments