forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 2.11 KB
/
Copy pathpython-package.yml
File metadata and controls
75 lines (61 loc) · 2.11 KB
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
name: Test and Publish
on: [push, pull_request]
jobs:
deploy:
strategy:
fail-fast: false
matrix:
os: [
"ubuntu-latest",
"macOS-latest",
"windows-latest"
]
python-version: [
#"3.10", not yet available on ubuntu
"3.9",
"3.8",
"3.7",
#"3.6" not available anymore on macOS
]
architecture: ["x86", "x64"]
timeout-minutes: 30
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.architecture }} - ${{ matrix.python-version }}
env:
DEPENDENCIES: lz4 brotli Pillow texture2ddecoder tabulate etcpak
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools twine
pip install pytest ${{ env.DEPENDENCIES }}
- name: Install module
run: |
pip install . --use-feature=in-tree-build
- name: Test with pytest
run: |
pytest -v -s
- name: Build Python wheel
if: success() && runner.os != 'Linux' && github.event_name == 'push'
run: |
python setup.py sdist bdist_wheel
# TODO - fix missing PIL components
# - name: Build manylinux Python wheels
# if: success() && runner.os == 'Linux' && github.event_name == 'push'
# uses: RalfG/[email protected]_x86_64
# with:
# python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
# system-packages: 'jpeg-devel zlib-devel'
# build-requirements: ${{ env.DEPENDENCIES }}
- name: Publish wheels to PyPI
if: success() && github.event_name == 'push' && env.TWINE_PASSWORD != '' && runner.os != 'Linux' # TODO - remove != Linux once manylinux is fixed
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/* --skip-existing