Skip to content

Commit 174eb77

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

2 files changed

Lines changed: 88 additions & 1 deletion

File tree

.github/workflows/build-macos.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
python -m pytest tests/
58+
59+
- name: Build DVR-Scan
60+
run: |
61+
python dist/pre_release.py --use-local-images
62+
pyinstaller dist/dvr-scan.spec
63+
python dist/post_release.py
64+
65+
- name: Upload
66+
uses: actions/upload-artifact@v4.6.0
67+
with:
68+
name: DVR-Scan-macos
69+
path: dist/dvr-scan
70+
71+
test:
72+
runs-on: macos-latest
73+
needs: build
74+
steps:
75+
- uses: actions/checkout@v4
76+
77+
- uses: actions/download-artifact@v4.1.8
78+
with:
79+
name: DVR-Scan-macos
80+
path: build
81+
82+
- name: Test Artifact
83+
run: |
84+
./build/dvr-scan --version
85+
./build/dvr-scan --license
86+
./build/dvr-scan -i tests/resources/simple_movement.mp4 -so -et 5s -df 3
87+
./build/dvr-scan -i tests/resources/simple_movement.mp4 -et 5s -df 3 -m copy

.github/workflows/build-windows-cuda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
-DBUILD_SHARED_LIBS=OFF `
119119
-DWITH_CUDA=ON `
120120
-DCUDA_ARCH_BIN="6.0;6.1;7.0;7.5" `
121-
-DCUDA_ARCH_PTX=7.5 `
121+
-DCUDA_ARCH_PTX="7.5" `
122122
-DOPENCV_ENABLE_NONFREE=ON `
123123
-DENABLE_LTO=ON `
124124
-DCPU_DISPATCH="AVX,AVX2" `

0 commit comments

Comments
 (0)