forked from invoke-ai/PyPatchMatch
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (69 loc) · 1.82 KB
/
verify-buildability.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Verify buildability
on:
push:
paths:
- pyproject.toml
- patchmatch
- github/workflows/verify-buildability.yml
pull_request:
workflow_dispatch:
jobs:
pre-commit-check:
runs-on: ubuntu-latest
env:
PIP_USE_PEP517: '1'
steps:
- name: Checkout sources
id: checkout-sources
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: pyproject.toml
- name: install dev dependencies
run: pip3 install ".[dev]"
- name: run pre-commit-check
run: >
pre-commit run
--all-files
--show-diff-on-failure
build:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
os:
- windows-latest
- ubuntu-latest
- macos-latest
fail-fast: false
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
PIP_USE_PEP517: '1'
steps:
- name: Checkout sources
id: checkout-sources
uses: actions/checkout@v3
- name: linux prerequisites
if: runner.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libopencv-dev
- name: macos prerequisites
if: runner.os == 'macos'
run: brew install opencv
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: install PyPatchMatch
run: pip3 install --upgrade .
- name: run py_example.py
run: python3 examples/py_example.py