ci: shared ci-workflows macOS workflow; fix the Xcode 27 Document ambiguity (blocked: runner has no GUI session) #3

Merged
james.maes merged 4 commits from ci/shared-macos into main 2026-11-08 23:28:57 +00:00
3 changed files with 26 additions and 1 deletions

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
name: build
on:
push:
branches: ['**']
tags: ['v*']
jobs:
macos:
uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1
secrets: inherit
with:
# Build only: the app and the test bundle are compiled unsigned, the tests are not run. They are
# app-hosted XCTests and the grogu runner has no GUI session for testmanagerd; run `just test`
# locally before merging (README, Building from Source). Package.swift has no test target.
commands: |
xcodegen generate
xcodebuild -quiet -project markdownViewr.xcodeproj -scheme markdownViewr -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build-for-testing
+9
View File
@@ -61,3 +61,12 @@ just run
```
`just --list` shows all available recipes.
### Tests
The tests are app-hosted XCTests (`markdownViewrTests`). CI builds the app and the test bundle unsigned
but does not run them (the CI macOS runner has no GUI session), so run them locally before merging:
```bash
just test # xcodegen generate first if the project is stale
```
+1 -1
View File
@@ -275,7 +275,7 @@ struct MarkdownDocument: FileDocument {
private struct HTMLConverter: MarkupWalker {
private var result = ""
mutating func visit(_ document: Document) -> String {
mutating func visit(_ document: Markdown.Document) -> String {
result = ""
for child in document.children {
visitChild(child)