Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,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: |
Expand All @@ -45,7 +54,11 @@ jobs:
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make package
if [ "${{ runner.os }}" = "macOS" ]; then
MACOSX_DEPLOYMENT_TARGET=14.0 make package
else
make package
fi
- name: Test package
shell: bash
run: |
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: build test package clean

MACOSX_DEPLOYMENT_TARGET ?= 14.0

build:
poetry install
# if macOS, build swift
Expand All @@ -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
Expand Down
Loading