-
Notifications
You must be signed in to change notification settings - Fork 0
Arbitrate concurrent macOS Now Playing sessions #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8fa2acf
feat: arbitrate concurrent now playing sessions
nonnil f5388ee
fix: switch after now playing stops
nonnil 92134aa
fix: harden now playing session updates
nonnil 20619a5
fix: complete media session refreshes
nonnil 2de5f89
fix: harden now playing session helper
nonnil e353e6d
fix: fall back when last playing date is unavailable
nonnil 26647eb
ci: verify media session helpers
nonnil 5d45bd2
fix: isolate media session playback errors
nonnil 4f0e118
fix: degrade missing media metadata
nonnil 4000620
fix: restart media helper after callback timeout
nonnil 18b6a06
fix: bound media session payloads
nonnil 5287930
fix: bound media arbitration state
nonnil e55f249
ci: run media helper smoke tests
nonnil 0cc988a
fix: harden media refresh pipeline
nonnil 7ed7336
fix: redeliver recovered artwork
nonnil 5129acd
fix: budget artwork encoding before allocation
nonnil 4e18c89
fix: bound retained media metadata
nonnil d4e69c2
fix: stabilize bounded media enrichment
nonnil 7784252
fix: preserve unresolved playback fallbacks
nonnil 6bc00ef
fix: treat reverse playback as active
nonnil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| RUST_TOOLCHAIN: 1.88.0 | ||
|
|
||
| jobs: | ||
| rust: | ||
| name: Rust checks and macOS builds | ||
| runs-on: macos-15 | ||
| steps: | ||
| - name: Check out source | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install pinned Rust toolchain | ||
| run: | | ||
| set -euo pipefail | ||
| rustup toolchain install "$RUST_TOOLCHAIN" --profile minimal --component rustfmt --component clippy | ||
| rustup target add --toolchain "$RUST_TOOLCHAIN" \ | ||
| aarch64-apple-darwin \ | ||
| x86_64-apple-darwin | ||
|
|
||
| - name: Smoke test Objective-C media helper | ||
| run: | | ||
| set -euo pipefail | ||
| smoke_executable="${RUNNER_TEMP}/codex_micro_chroma_media_sessions_smoke" | ||
| /usr/bin/xcrun clang \ | ||
| -fobjc-arc \ | ||
| -fblocks \ | ||
| -Wall \ | ||
| -Wextra \ | ||
| -Werror \ | ||
| -DMEDIA_SESSIONS_SMOKE \ | ||
| -framework Foundation \ | ||
| src/media_sessions.m \ | ||
| -o "$smoke_executable" | ||
| "$smoke_executable" | ||
|
|
||
| - name: Check formatting | ||
| run: cargo +"$RUST_TOOLCHAIN" fmt --all --check | ||
|
|
||
| - name: Lint | ||
| run: cargo +"$RUST_TOOLCHAIN" clippy --all-targets --all-features --locked -- -D warnings | ||
|
|
||
| - name: Test | ||
| run: cargo +"$RUST_TOOLCHAIN" test --all-targets --all-features --locked | ||
|
|
||
| - name: Build arm64 release binary | ||
| run: | | ||
| set -euo pipefail | ||
| cargo +"$RUST_TOOLCHAIN" build --release --locked --target aarch64-apple-darwin | ||
| helper_count="$(find target/aarch64-apple-darwin/release/build -path '*/out/codex_micro_chroma_media_sessions' -print | wc -l | tr -d ' ')" | ||
| test "$helper_count" = "1" | ||
| helper="$(find target/aarch64-apple-darwin/release/build -path '*/out/codex_micro_chroma_media_sessions' -print)" | ||
| /usr/bin/lipo "$helper" -verify_arch arm64 | ||
| /usr/bin/codesign --verify --verbose "$helper" | ||
| /usr/bin/codesign -dv "$helper" | ||
|
|
||
| - name: Build x86_64 release binary | ||
| run: | | ||
| set -euo pipefail | ||
| cargo +"$RUST_TOOLCHAIN" build --release --locked --target x86_64-apple-darwin | ||
| helper_count="$(find target/x86_64-apple-darwin/release/build -path '*/out/codex_micro_chroma_media_sessions' -print | wc -l | tr -d ' ')" | ||
| test "$helper_count" = "1" | ||
| helper="$(find target/x86_64-apple-darwin/release/build -path '*/out/codex_micro_chroma_media_sessions' -print)" | ||
| /usr/bin/lipo "$helper" -verify_arch x86_64 | ||
| /usr/bin/codesign --verify --verbose "$helper" | ||
| /usr/bin/codesign -dv "$helper" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.