Files
upstream-mirror 8e9cceaeae
Some checks failed
Build / test on ubuntu-latest (py-3.9) (push) Failing after 2m36s
Build / typecheck (push) Successful in 1m38s
Build / test on macos-latest (py-3.9) (push) Has been cancelled
Build / test on windows-latest (py-3.9) (push) Has been cancelled
CodeQL / Analyze (python) (push) Failing after 1s
snapshot of https://github.com/ActivityWatch/aw-watcher-window.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:21:37 +05:00

97 lines
2.7 KiB
YAML

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: test on ${{ matrix.os }} (py-${{ matrix.python_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: [3.9]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Create virtualenv
shell: bash
run: |
python -m venv venv
- name: Install dependencies
shell: bash
run: |
# we need poetry==1.3.2
# due to: https://github.com/python-poetry/poetry/issues/7611
# 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
if [ "${{ runner.os }}" = "macOS" ]; then
MACOSX_DEPLOYMENT_TARGET=12.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 12.0'
- name: Run tests
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make test
- name: Package
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
if [ "${{ runner.os }}" = "macOS" ]; then
MACOSX_DEPLOYMENT_TARGET=12.0 make package
else
make package
fi
- name: Test package
shell: bash
run: |
dist/aw-watcher-window/aw-watcher-window --help
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: aw-watcher-window-${{ runner.os }}-py${{ matrix.python_version }}
path: dist/aw-watcher-window
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Create virtualenv
shell: bash
run: |
python -m venv venv
- name: Install dependencies
shell: bash
run: |
pip install poetry
source venv/bin/activate || source venv/Scripts/activate
make build
- name: Typecheck
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make typecheck