Skip to content

Commit f35d8ca

Browse files
committed
[build] Add new builder for MacOS App Image
1 parent 6c423c6 commit f35d8ca

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

.github/workflows/build-macos.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Build MacOS App Bundle for DVR-Scan
2+
name: MacOS Distribution
3+
4+
# TODO: Enable schedule.
5+
on:
6+
# schedule:
7+
# - cron: '0 0 * * *'
8+
# pull_request:
9+
# paths:
10+
# - dist/**
11+
# - dvr_scan/**
12+
# - tests/**
13+
# push:
14+
# paths:
15+
# - dist/**
16+
# - dvr_scan/**
17+
# - tests/**
18+
# tags:
19+
# - v*-release
20+
workflow_dispatch:
21+
22+
env:
23+
ffmpeg_version: "8.0"
24+
UV_SYSTEM_PYTHON: 1
25+
UV_LINK_MODE: "symlink"
26+
27+
28+
jobs:
29+
build:
30+
runs-on: macos-latest
31+
strategy:
32+
matrix:
33+
python-version: ["3.12"]
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
cache: 'pip'
43+
44+
- name: Install uv and set the python version
45+
uses: astral-sh/setup-uv@v4
46+
with:
47+
version: "0.5.11"
48+
python-version: ${{ matrix.python-version }}
49+
50+
- name: Install Dependencies
51+
run: |
52+
uv pip install --upgrade pip build wheel virtualenv setuptools
53+
uv pip install -r dist/requirements_windows.txt -r docs/requirements.txt
54+
55+
- name: Unit Test
56+
run: |
57+
7z e ffmpeg-${{ env.ffmpeg_version }}-full_build.7z ffmpeg.exe -r
58+
python -m pytest tests/
59+
60+
- name: Build DVR-Scan
61+
run: |
62+
python dist/pre_release.py --use-local-images
63+
pyinstaller dist/dvr-scan.spec
64+
python dist/post_release.py
65+
66+
- name: Upload
67+
uses: actions/[email protected]
68+
with:
69+
name: DVR-Scan-macos
70+
path: dist/dvr-scan
71+
72+
test:
73+
runs-on: macos-latest
74+
needs: build
75+
steps:
76+
- uses: actions/checkout@v4
77+
78+
- uses: actions/[email protected]
79+
with:
80+
name: DVR-Scan-macos
81+
path: build
82+
83+
- name: Test Artifact
84+
run: |
85+
./build/dvr-scan --version
86+
./build/dvr-scan --license
87+
./build/dvr-scan -i tests/resources/simple_movement.mp4 -so -et 5s -df 3
88+
./build/dvr-scan -i tests/resources/simple_movement.mp4 -et 5s -df 3 -m copy

0 commit comments

Comments
 (0)