From c87f9a8fc5dee430264b13250a9cd0691aec11b8 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 7 May 2026 14:52:35 +0000 Subject: [PATCH 1/2] fix: target macOS 14 for swift helper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 8 ++++++++ Makefile | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c8ab353..bd984e18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ master ] +env: + MACOSX_DEPLOYMENT_TARGET: "14.0" + jobs: test: name: test on ${{ matrix.os }} (py-${{ matrix.python_version }}) @@ -46,6 +49,11 @@ jobs: run: | source venv/bin/activate || source venv/Scripts/activate make package + - name: Check macOS deployment target + if: runner.os == 'macOS' + shell: bash + run: | + otool -l aw_watcher_window/aw-watcher-window-macos | grep -A4 'LC_BUILD_VERSION' | grep 'minos 14.0' - name: Test package shell: bash run: | diff --git a/Makefile b/Makefile index 4c50b28d..7e162dcc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ .PHONY: build test package clean +MACOSX_DEPLOYMENT_TARGET ?= 14.0 + build: poetry install # if macOS, build swift @@ -10,7 +12,7 @@ build: build-swift: aw_watcher_window/aw-watcher-window-macos aw_watcher_window/aw-watcher-window-macos: aw_watcher_window/macos.swift - swiftc $^ -o $@ + swiftc -target "$(shell uname -m)-apple-macosx$(MACOSX_DEPLOYMENT_TARGET)" $^ -o $@ test: aw-watcher-window --help From 07a577b2c08092c15c2d0454085babc2fc4ff1ba Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 7 May 2026 15:23:42 +0000 Subject: [PATCH 2/2] fix(ci): scope macOS deployment target in workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd984e18..928a098b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ master ] -env: - MACOSX_DEPLOYMENT_TARGET: "14.0" - jobs: test: name: test on ${{ matrix.os }} (py-${{ matrix.python_version }}) @@ -38,7 +35,16 @@ jobs: # seen in: https://github.com/ActivityWatch/aw-watcher-window/actions/runs/5891369412/job/15978283144 pip install poetry==1.3.2 source venv/bin/activate || source venv/Scripts/activate - make build + if [ "${{ runner.os }}" = "macOS" ]; then + MACOSX_DEPLOYMENT_TARGET=14.0 make build + else + make build + fi + - name: Check macOS deployment target + if: runner.os == 'macOS' + shell: bash + run: | + otool -l aw_watcher_window/aw-watcher-window-macos | grep -A4 'LC_BUILD_VERSION' | grep 'minos 14.0' - name: Run tests shell: bash run: | @@ -48,12 +54,11 @@ jobs: shell: bash run: | source venv/bin/activate || source venv/Scripts/activate - make package - - name: Check macOS deployment target - if: runner.os == 'macOS' - shell: bash - run: | - otool -l aw_watcher_window/aw-watcher-window-macos | grep -A4 'LC_BUILD_VERSION' | grep 'minos 14.0' + if [ "${{ runner.os }}" = "macOS" ]; then + MACOSX_DEPLOYMENT_TARGET=14.0 make package + else + make package + fi - name: Test package shell: bash run: |