Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_reusable-ui-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
path: |
.ai-tmp/ci-ui-smoke/DerivedData/SourcePackages
.ai-tmp/ci-ui-smoke/DerivedData/ModuleCache.noindex
key: xcode-meta-ui-${{ runner.os }}-${{ hashFiles('Apps/VoidDisplay/VoidDisplay.xcodeproj/**', '**/Package.resolved') }}
key: xcode-meta-ui-${{ runner.os }}-${{ hashFiles('VoidDisplay.xcodeproj/**', '**/Package.resolved') }}
restore-keys: |
xcode-meta-ui-${{ runner.os }}-

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'Tests/**'
- 'UITests/**'
- 'Apps/VoidDisplay/**'
- 'VoidDisplay.xcodeproj/**'
- 'Tools/VoidDisplayRelay/**'
- 'Package.swift'
- 'Package.resolved'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
version="$(sed -nE 's/^[[:space:]]*MARKETING_VERSION = ([^;]+);/\1/p' Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj | sort -u)"
version="$(sed -nE 's/^[[:space:]]*MARKETING_VERSION = ([^;]+);/\1/p' VoidDisplay.xcodeproj/project.pbxproj | sort -u)"
test -n "$version"
tool_root="$GITHUB_WORKSPACE"
ROOT_DIR="$GITHUB_WORKSPACE" TOOL_ROOT="$tool_root" "$tool_root/scripts/release/build.sh" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
branches:
- main
paths:
- 'Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj'
- 'VoidDisplay.xcodeproj/project.pbxproj'
- 'Tools/VoidDisplayRelay/**'
- 'scripts/build-relay.sh'
- 'scripts/ci/**'
Expand Down
4 changes: 2 additions & 2 deletions UITests/VoidDisplayTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
],
"defaultOptions" : {
"targetForVariableExpansion" : {
"containerPath" : "container:../Apps/VoidDisplay/VoidDisplay.xcodeproj",
"containerPath" : "container:../VoidDisplay.xcodeproj",
"identifier" : "BA0465CF2E90E53C00012958",
"name" : "VoidDisplay"
}
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:../Apps/VoidDisplay/VoidDisplay.xcodeproj",
"containerPath" : "container:../VoidDisplay.xcodeproj",
"identifier" : "BA0465E62E90E53D00012958",
"name" : "VoidDisplayUITests"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@
BA0465D22E90E53C00012958 /* VoidDisplay */ = {
isa = PBXFileSystemSynchronizedRootGroup;
name = VoidDisplay;
path = .;
path = Apps/VoidDisplay;
sourceTree = "<group>";
};
BA0465EA2E90E53D00012958 /* VoidDisplayUITests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
name = VoidDisplayUITests;
path = ../../UITests/VoidDisplayUITests;
path = UITests/VoidDisplayUITests;
sourceTree = "<group>";
};
CDAA10012F01A00100000001 /* Sources */ = {
isa = PBXFileSystemSynchronizedRootGroup;
name = Sources;
path = ../../Sources;
path = Sources;
sourceTree = "<group>";
};
CDAA10022F01A00100000001 /* Tests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
name = Tests;
path = ../../Tests;
path = Tests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
Expand Down Expand Up @@ -163,7 +163,7 @@
mainGroup = BA0465C72E90E53C00012958;
minimizedProjectReferenceProxies = 1;
packageReferences = (
837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "../.." */,
837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "." */,
);
preferredProjectObjectVersion = 90;
productRefGroup = BA0465D12E90E53C00012958 /* Products */;
Expand Down Expand Up @@ -194,15 +194,17 @@
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
inputPaths = (
"$(TOOL_ROOT)/mise.toml",
"$(TOOL_ROOT)/mise.lock",
"$(TOOL_ROOT)/scripts/build-relay.sh",
"$(TOOL_ROOT)/scripts/lib/contract.sh",
"$(TOOL_ROOT)/scripts/lib/common.sh",
"$(TOOL_ROOT)/scripts/lib/architecture.sh",
"$(TOOL_ROOT)/scripts/lib/release_binaries.sh",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/go.mod",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/go.sum",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/cmd/voiddisplay-relay/main.go",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/cmd/voiddisplay-relay/main_test.go",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/go.mod",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/go.sum",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/internal/relay/server.go",
"$(ROOT_DIR)/Tools/VoidDisplayRelay/internal/relay/server_test.go",
);
Expand All @@ -212,7 +214,7 @@
);
shellPath = /bin/bash;
shellScript = (
"cd \"$SRCROOT/../..\"",
"cd \"$SRCROOT\"",
"export ROOT_DIR=\"${ROOT_DIR:-$PWD}\"",
"export TOOL_ROOT=\"${TOOL_ROOT:-$ROOT_DIR}\"",
"\"$TOOL_ROOT/scripts/build-relay.sh\"",
Expand Down Expand Up @@ -425,7 +427,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.developerchen.voiddisplay;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
ROOT_DIR = "$(SRCROOT)/../..";
ROOT_DIR = "$(SRCROOT)";
SDKROOT = auto;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = macosx;
Expand Down Expand Up @@ -494,7 +496,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.developerchen.voiddisplay;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
ROOT_DIR = "$(SRCROOT)/../..";
ROOT_DIR = "$(SRCROOT)";
SDKROOT = auto;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = macosx;
Expand Down Expand Up @@ -609,16 +611,16 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "../.." */ = {
837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../..;
relativePath = .;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
9FED0F7AAD6710D42320E832 /* VoidDisplayApp */ = {
isa = XCSwiftPackageProductDependency;
package = 837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "../.." */;
package = 837EFB7AC90CC3286DF0B571 /* XCLocalSwiftPackageReference "." */;
productName = VoidDisplayApp;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
2 changes: 1 addition & 1 deletion VoidDisplay.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ci-final-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Nightly 失败不应直接阻断普通 PR,但必须在仓库首页、issue 或

Release workflow 支持两种入口。workflow 先不 checkout 目标代码,只用 GitHub API 解析目标 SHA,并用内联 GitHub API 逻辑验证目标 SHA 的 `ci-gate`。验证成功后,workflow 才 checkout 目标 commit 并执行 release 脚本。版本判断、tag 判断、build number 规则都由 `scripts/release/prepare.sh` 执行。`prepare` 输出 `should_release=true` 后才允许 build 和 publish。

第一种是 push 到 `main`。当 `Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj` 中的版本字段变化时触发 release 判断。
第一种是 push 到 `main`。当 `VoidDisplay.xcodeproj/project.pbxproj` 中的版本字段变化时触发 release 判断。

第二种是 `workflow_dispatch`。人工输入 tag 和 target ref 后,workflow 校验输入 tag 是否等于 `v${MARKETING_VERSION}`。

Expand Down
6 changes: 3 additions & 3 deletions docs/display-runtime-phase-1-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ Phase 1 只建立模型、端口、只读快照和对照验证,不迁移命令
- 保留现有 `CaptureSnapshotProvider`、`SharingSnapshotProvider`、`VirtualDisplaySnapshotProvider`、`ScreenCatalogSnapshotProvider` 作为 Phase 1 parity 对照。
- 不处理 LAN Web View token、访问密码、账号体系或鉴权层。
- 不修改 `ObservabilitySnapshotProvider` 协议形状;Phase 1 runtime provider 必须适配现有 `@MainActor` 同步 `makeSnapshot()`。
- 不主动修改 `Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj`;现有 app scheme 已通过 SwiftPM product `VoidDisplayApp` 消费 package。
- 不主动修改 `VoidDisplay.xcodeproj/project.pbxproj`;现有 app scheme 已通过 SwiftPM product `VoidDisplayApp` 消费 package。

## Implementation Plan

### 1. Preflight

- 先处理当前未提交的 `Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj` 变更,避免和新增 target 修改混在一起。
- 先处理当前未提交的 `VoidDisplay.xcodeproj/project.pbxproj` 变更,避免和新增 target 修改混在一起。
- 确认 `docs/product-positioning.md` 和 `docs/display-runtime-refactor-plan.md` 已作为 Phase 1 依据提交或单独保留。
- 记录 Phase 1 开工前基线验证结果。
- 若 Phase 1 实现时 `project.pbxproj` 仍有未处理改动,停止实现并先处理该工作区状态。
Expand All @@ -53,7 +53,7 @@ Phase 1 只建立模型、端口、只读快照和对照验证,不迁移命令
- 修改 `VoidDisplayApp` dependencies,加入 `VoidDisplayRuntime`。
- 新增 `VoidDisplayRuntimeTests`,依赖 `VoidDisplayRuntime`、`VoidDisplayFoundation`、`VoidDisplayObservability`、`VoidDisplayTestingSupport`。
- `VoidDisplayRuntime` 不新增 public product,所有跨 target API 使用 `package` 访问级别。
- 不修改 `Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj`,除非 Xcode build 证明现有 local Swift package product 无法自动解析更新后的 `VoidDisplayApp` dependency graph。
- 不修改 `VoidDisplay.xcodeproj/project.pbxproj`,除非 Xcode build 证明现有 local Swift package product 无法自动解析更新后的 `VoidDisplayApp` dependency graph。
- 不修改 app-facing localization。

### 3. Runtime Model
Expand Down
2 changes: 1 addition & 1 deletion docs/display-runtime-refactor-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ LAN Web View 路由规则:

执行项:

- 先处理当前未提交的 `Apps/VoidDisplay/VoidDisplay.xcodeproj/project.pbxproj` 变更,避免和新增 target、Xcode 工程修改混在一起。
- 先处理当前未提交的 `VoidDisplay.xcodeproj/project.pbxproj` 变更,避免和新增 target、Xcode 工程修改混在一起。
- 记录当前基线验证结果:SwiftPM targeted tests 和 Xcode Debug build。
- 为 LAN Web View 记录基线表现,输出到 `.ai-tmp/display-runtime-baseline/`。
- 基线记录包含目标分辨率、帧率、viewer 数、CPU、内存、明显延迟体感、测试设备和网络条件。
Expand Down
2 changes: 1 addition & 1 deletion docs/testing/macos-syspolicy-startup-crash-playbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sudo killall syspolicyd

```bash
xcodebuild test \
-project Apps/VoidDisplay/VoidDisplay.xcodeproj \
-project VoidDisplay.xcodeproj \
-scheme VoidDisplay \
-destination 'platform=macOS,arch=arm64' \
-derivedDataPath .ai-tmp/syspolicy-playbook/DerivedData \
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ mkdir -p "$OUTPUT_DIR"
cd "$RELAY_DIR"

env GOPROXY="$GOPROXY_VALUE" "$GO_BIN" test ./...
env GOPROXY="$GOPROXY_VALUE" GOOS=darwin GOARCH="$GOARCH_VALUE" "$GO_BIN" build -trimpath -o "$OUTPUT_PATH" ./cmd/voiddisplay-relay
env GOPROXY="$GOPROXY_VALUE" GOOS=darwin GOARCH="$GOARCH_VALUE" "$GO_BIN" build -buildvcs=false -trimpath -o "$OUTPUT_PATH" ./cmd/voiddisplay-relay
chmod +x "$OUTPUT_PATH"
require_binary_arch "Relay" "$OUTPUT_PATH" "$TARGET_ARCH"
8 changes: 4 additions & 4 deletions scripts/ci/classification-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"categories": {
"code": {
"exact": ["Package.swift", "Package.resolved", "mise.toml", "mise.lock", "Brewfile", ".swiftformat", ".swiftlint.yml", ".github/dependabot.yml"],
"prefixes": ["Sources/", "Tests/", "UITests/", "Apps/VoidDisplay/", "Tools/VoidDisplayRelay/", "scripts/", ".github/workflows/", ".github/actions/"],
"prefixes": ["Sources/", "Tests/", "UITests/", "Apps/VoidDisplay/", "VoidDisplay.xcodeproj/", "Tools/VoidDisplayRelay/", "scripts/", ".github/workflows/", ".github/actions/"],
"globs": ["*/Package.resolved"]
},
"ui": {
"exact": [],
"prefixes": ["UITests/", "Apps/VoidDisplay/", "Sources/VoidDisplayApp/", "Sources/VoidDisplayDesignSystem/", "Sources/VoidDisplayCapture/", "Sources/VoidDisplaySharing/", "Sources/VoidDisplaySupport/", "Sources/VoidDisplayVirtualDisplay/"],
"prefixes": ["UITests/", "Apps/VoidDisplay/", "VoidDisplay.xcodeproj/", "Sources/VoidDisplayApp/", "Sources/VoidDisplayDesignSystem/", "Sources/VoidDisplayCapture/", "Sources/VoidDisplaySharing/", "Sources/VoidDisplaySupport/", "Sources/VoidDisplayVirtualDisplay/"],
"globs": []
},
"script": {
Expand All @@ -17,7 +17,7 @@
},
"product_code": {
"exact": ["Package.swift", "Package.resolved"],
"prefixes": ["Sources/", "Apps/VoidDisplay/", "Tools/VoidDisplayRelay/"],
"prefixes": ["Sources/", "Apps/VoidDisplay/", "VoidDisplay.xcodeproj/", "Tools/VoidDisplayRelay/"],
"globs": ["*/Package.resolved"]
},
"test_code": {
Expand All @@ -32,7 +32,7 @@
},
"release": {
"exact": [".github/workflows/release.yml", "scripts/lib/architecture.sh", "scripts/lib/release_binaries.sh"],
"prefixes": ["Apps/VoidDisplay/", "Tools/VoidDisplayRelay/", "scripts/release/"],
"prefixes": ["Apps/VoidDisplay/", "VoidDisplay.xcodeproj/", "Tools/VoidDisplayRelay/", "scripts/release/"],
"globs": ["scripts/ci/release_*.sh"]
},
"dependency_manifest": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/release_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ go_mod_download_with_retry "$ROOT_DIR/Tools/VoidDisplayRelay"
set +e
xcodebuild \
-scheme VoidDisplay \
-project Apps/VoidDisplay/VoidDisplay.xcodeproj \
-project VoidDisplay.xcodeproj \
-configuration Release \
-destination "$(xcode_destination_for_arch "$ARCH")" \
-derivedDataPath "$DERIVED_DATA_PATH" \
Expand Down
Loading
Loading