Skip to content

feat(ios): enable the approved multicast networking entitlement (#48) #180

feat(ios): enable the approved multicast networking entitlement (#48)

feat(ios): enable the approved multicast networking entitlement (#48) #180

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# The required checks (Go Tests, Notify Tests) are cheap ubuntu jobs and ALWAYS
# run, so branch-protection PRs never hang on a never-reported status — the trap
# a bare top-level `paths-ignore:` creates once a job is a required check (a
# path-filtered *workflow* stays "Expected" forever, blocking the PR). Instead
# the only thing gated is the ~10x-priced macOS "Build & Test" job, on whether
# any non-docs file changed, detected here.
changes:
name: Detect changes
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: read # dorny lists PR files via the API on pull_request events
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
# Required for push events (e.g. merge to main): with no PR to query, dorny
# falls back to a local git diff and needs a working copy. On pull_request
# it uses the API, but the checkout is harmless there.
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
# "code" = anything that can affect the Go bridge or the iOS build.
# Docs-only changes (**/*.md, docs/**, LICENSE, …) match nothing here,
# so the macOS build is skipped. Add new top-level code trees here if
# the repo layout grows. (Per-pattern OR semantics make a "!docs/**"
# negation list unreliable, hence the positive allow-list.)
filters: |
code:
- 'go/**'
- 'ios/**'
- 'notify/**'
- '.github/**'
go-tests:
name: Go Tests
runs-on: ubuntu-latest # pure-Go bridge suite; needs no macOS/Xcode
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go/go.mod
cache-dependency-path: go/go.sum
- name: Patch vendored dependencies
working-directory: go
run: make patch
- name: Run Go tests
working-directory: go
# The status/event schema regression tests (Phase 1/3 fields, folder
# error details) live in ./bridge and run as part of this package — no
# separate runner needed.
run: go test -tags noassets ./bridge -count=1
notify-tests:
name: Notify Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: notify/go.mod
- name: Run notify smoke tests
working-directory: notify
run: go test ./... -count=1
design-lint:
name: Design Token Lint
runs-on: ubuntu-latest # pure bash/grep guardrail; no Xcode needed
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- name: Check design tokens
# Fails if views reintroduce raw status colors instead of Theme.swift
# tokens — keeps the redesign's single source of truth from eroding.
run: ios/scripts/design-token-lint.sh
build:
name: Build & Test
runs-on: macos-26 # Xcode 26.2 default, iOS 26 SDK required for BGContinuedProcessingTask
timeout-minutes: 45 # guard against a hung simulator/xcodebuild burning 10x macOS minutes
needs:
- changes
- go-tests
- notify-tests
- design-lint
# Skip the expensive macOS build on docs-only changes. It is not a required
# status check, so skipping never blocks a PR. The plain expression (no
# always()/status function) keeps the implicit "all needs succeeded" gate,
# so a failed test job still skips the build exactly as before.
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go/go.mod
cache-dependency-path: go/go.sum
- name: Cache gomobile toolchain
uses: actions/cache@v5
with:
path: |
~/go/bin/gomobile
~/go/bin/gobind
key: gomobile-${{ runner.os }}-3a7bc9f8a4de
- name: Install gomobile
run: |
command -v gomobile >/dev/null || go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20250305212854-3a7bc9f8a4de
command -v gobind >/dev/null || go install golang.org/x/mobile/cmd/gobind@v0.0.0-20250305212854-3a7bc9f8a4de
gomobile init
- name: Patch vendored dependencies
working-directory: go
run: make patch
- name: Build xcframework
working-directory: go
run: make xcframework
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate Xcode project
working-directory: ios
run: xcodegen generate
- name: List available simulators
run: xcrun simctl list devices available
- name: Build & Test
working-directory: ios
run: |
xcodebuild build test \
-project VaultSync.xcodeproj \
-scheme VaultSync \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=latest' \
-quiet