From 8375922c069a244133d083a0bb50273e134be6b1 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 12 May 2026 15:05:36 +0300 Subject: ci: run checks on macos --- .github/workflows/ci.yml | 11 ++++++++++- .gitignore | 1 + src/platform/macos.rs | 10 +--------- tests/api_ping.rs | 2 ++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eef595f..42567df2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,12 @@ concurrency: jobs: check: - runs-on: ubuntu-latest + name: check (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v4 @@ -35,6 +40,10 @@ jobs: with: version: 0.15.2 + - name: Install macOS build tools + if: runner.os == 'macOS' + run: brew install cmake ninja + - name: Restore cargo cache uses: Swatinem/rust-cache@v2 diff --git a/.gitignore b/.gitignore index f344da80..6b74b848 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target +/vendor/libghostty-vt/zig-pkg/ __pycache__/ *.pyc *.swp diff --git a/src/platform/macos.rs b/src/platform/macos.rs index 2e9b83b5..987f5f54 100644 --- a/src/platform/macos.rs +++ b/src/platform/macos.rs @@ -21,7 +21,7 @@ pub fn foreground_job(child_pid: u32) -> Option { let Some(info) = process_bsdinfo(pid) else { continue; }; - if info.pbi_pgid as u32 != fg_pgid { + if info.pbi_pgid != fg_pgid { continue; } @@ -191,14 +191,6 @@ fn kern_procargs2(pid: u32) -> Option> { } } -/// Fallback: read `pbi_comm` from `proc_pidinfo(PROC_PIDTBSDINFO)`. -/// -/// This is the kernel-level short command name (like `node`, `zsh`). -/// It does NOT reflect `process.title` changes. -fn process_comm_name(pid: u32) -> Option { - process_bsdinfo(pid).and_then(|info| comm_from_bsdinfo(&info)) -} - pub fn write_clipboard(bytes: &[u8]) -> bool { run_clipboard_command( &ClipboardCommand { diff --git a/tests/api_ping.rs b/tests/api_ping.rs index bcb97ab3..b1282c56 100644 --- a/tests/api_ping.rs +++ b/tests/api_ping.rs @@ -178,6 +178,7 @@ fn open_subscription(socket_path: &Path, json: &str) -> JsonLineReader { reader } +#[cfg(not(target_os = "macos"))] fn wait_for_event( reader: &mut JsonLineReader, expected: &str, @@ -186,6 +187,7 @@ fn wait_for_event( wait_for_event_matching(reader, expected, timeout, |_| true) } +#[cfg(not(target_os = "macos"))] fn wait_for_event_matching( reader: &mut JsonLineReader, expected: &str, -- cgit v1.2.3