Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2e3f11e70 | ||
|
|
c3c9bbc5ba | ||
|
|
b5683aa36a | ||
|
|
707455dcfb | ||
|
|
17ee5d6717 | ||
|
|
2295bcdbae | ||
|
|
c9bff50a1a | ||
|
|
1b3d3dd821 | ||
|
|
55dee0f0cd | ||
|
|
45fd2b988f |
@@ -45,6 +45,19 @@ jobs:
|
||||
CODE_SIGNING_ALLOWED=YES \
|
||||
CODE_SIGN_IDENTITY='-'
|
||||
|
||||
# Xcode embeds the shared ICCeryCore package framework into the app
|
||||
# and the test bundle without signing it. Ad-hoc hosts still require
|
||||
# every loaded dylib to carry a cdhash — dyld killed the test host at
|
||||
# launch (run 31992) — so sign every embedded copy once the build is
|
||||
# done (embed steps run after any build script phase) (#119).
|
||||
- name: Sign package product frameworks
|
||||
run: |
|
||||
find "$DERIVED/Build/Products/Debug" -depth -name '*_PackageProduct.framework' -print0 \
|
||||
| while IFS= read -r -d '' fw; do
|
||||
echo "signing $fw"
|
||||
codesign --force --sign - --timestamp=none "$fw"
|
||||
done
|
||||
|
||||
- name: Test unit (ICCeryCoreTests)
|
||||
run: |
|
||||
XCTESTRUN="$(find "$DERIVED" -name 'ICCery*.xctestrun' | head -n 1)"
|
||||
|
||||
@@ -110,7 +110,8 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
isPrinting = true
|
||||
let task = Task { @MainActor [weak self] in
|
||||
guard let self else { return }
|
||||
defer { self.printTask = nil }
|
||||
// `defer` cannot mutate isolated state under Swift 5.7
|
||||
// (Xcode 14.2 / macOS 12 runner), so clear explicitly (#113).
|
||||
var printed = 0
|
||||
for page in result.pages {
|
||||
do {
|
||||
@@ -123,6 +124,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
+ error.localizedDescription
|
||||
)
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -132,6 +134,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
autoHideAfter: nil
|
||||
)
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
}
|
||||
printTask = task
|
||||
}
|
||||
@@ -141,7 +144,6 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
isPrinting = true
|
||||
let task = Task { @MainActor [weak self] in
|
||||
guard let self else { return }
|
||||
defer { self.printTask = nil }
|
||||
do {
|
||||
try await spool(page, index: page.index, pageSize: pageSize)
|
||||
printNotice = Notice(
|
||||
@@ -156,6 +158,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
)
|
||||
}
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
}
|
||||
printTask = task
|
||||
}
|
||||
|
||||
@@ -138,16 +138,20 @@ struct Stage4View: View {
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.accessibilityIdentifier("colprofCopyright")
|
||||
|
||||
Toggle("Apply calibration curve", isOn: $model.applyCalibration)
|
||||
.accessibilityIdentifier("colprofApplyCalibration")
|
||||
// Nested VStack keeps the parent at the Swift 5.7 ViewBuilder
|
||||
// 10-child limit (Xcode 14.2 / macOS 12 CI runner, #111).
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Toggle("Apply calibration curve", isOn: $model.applyCalibration)
|
||||
.accessibilityIdentifier("colprofApplyCalibration")
|
||||
|
||||
if model.applyCalibration {
|
||||
HStack {
|
||||
TextField("Calibration .cal file", text: $model.calibrationFile)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.accessibilityIdentifier("colprofCalibrationFile")
|
||||
Button("Browse…") { model.browseForCalibrationFile() }
|
||||
.accessibilityIdentifier("btnBrowseCalibrationFile")
|
||||
if model.applyCalibration {
|
||||
HStack {
|
||||
TextField("Calibration .cal file", text: $model.calibrationFile)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.accessibilityIdentifier("colprofCalibrationFile")
|
||||
Button("Browse…") { model.browseForCalibrationFile() }
|
||||
.accessibilityIdentifier("btnBrowseCalibrationFile")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ final class ProcessRunSupportTests: XCTestCase {
|
||||
setRunning: { running.append($0) },
|
||||
resetLog: { resets += 1 },
|
||||
onLog: { batch in
|
||||
MainActor.assertIsolated()
|
||||
// MainActor.assertIsolated() needs Swift 5.9; the runner is
|
||||
// on Xcode 14.2 (Swift 5.7) (#115).
|
||||
XCTAssertTrue(Thread.isMainThread)
|
||||
received.append(contentsOf: batch)
|
||||
}
|
||||
) { onLog in
|
||||
|
||||
@@ -62,6 +62,13 @@ targets:
|
||||
OTHER_SWIFT_FLAGS: ["$(inherited)", "-strict-concurrency=minimal"]
|
||||
MACOSX_DEPLOYMENT_TARGET: "12.0"
|
||||
ARCHS: "$(ARCHS_STANDARD)"
|
||||
# Debug builds sign ad-hoc; hardened-runtime library validation would
|
||||
# reject the unsigned embedded ICCeryCore package framework when the
|
||||
# test host launches (run 31992, #119). Release keeps validation and
|
||||
# links the package statically anyway.
|
||||
configs:
|
||||
Debug:
|
||||
DISABLE_LIBRARY_VALIDATION: YES
|
||||
|
||||
ICCeryCoreTests:
|
||||
type: bundle.unit-test
|
||||
|
||||
Reference in New Issue
Block a user