Skip to content

Commit d1f9f97

Browse files
authored
19.16 - Use pyfmodex (K0lb3#141) and fix tests
* replace copied pyfmodex code with pyfmodes lib * fix tests * fix test_audioclip for unsupported archs * run tests before building wheels * fix test again, catch NotImplemented * fix for CIOBuildWHeel test * improve test matrix name
1 parent 5d7fef5 commit d1f9f97

5 files changed

Lines changed: 169 additions & 284 deletions

File tree

‎.github/workflows/python-package.yml‎

Lines changed: 80 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,83 @@ name: Test and Publish
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
deploy:
7-
strategy:
8-
fail-fast: false
9-
matrix:
10-
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
11-
cp: ["cp37","cp38","cp39","cp310"]
12-
13-
timeout-minutes: 30
14-
15-
runs-on: ${{ matrix.os }}
16-
name: ${{ matrix.os }} - ${{ matrix.cp }}
17-
18-
steps:
19-
- uses: actions/checkout@v2
20-
21-
- name: Set up Python
22-
uses: actions/setup-python@v1
23-
with:
24-
python-version: '3.10'
25-
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip wheel setuptools hatch
29-
pip install --upgrade twine
30-
31-
- name: Set up QEMU
32-
if: runner.os == 'Linux'
33-
uses: docker/setup-qemu-action@v1
34-
with:
35-
platforms: all
36-
37-
- name: Build wheels
38-
uses: pypa/cibuildwheel@v2.3.1
39-
env:
40-
CIBW_ARCHS_LINUX: auto aarch64
41-
CIBW_BUILD: |
42-
${{ matrix.cp }}-manylinux_x86_64 ${{ matrix.cp }}-manylinux_i686 ${{ matrix.cp }}-manylinux_aarch64 ${{ matrix.cp }}-win_amd64 ${{ matrix.cp }}-win32 ${{ matrix.cp }}-macosx_x86_64
43-
CIBW_REPAIR_WHEEL_COMMAND: '' # Disable auditwheel
44-
CIBW_TEST_REQUIRES: pytest
45-
CIBW_TEST_COMMAND: pytest -v -s {package}/tests
46-
47-
- name: Publish to PyPI
48-
if: success() && github.event_name == 'push' && env.TWINE_PASSWORD != '' && github.ref == 'refs/heads/master'
49-
env:
50-
TWINE_USERNAME: __token__
51-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
52-
run: |
53-
twine upload ./wheelhouse/*.whl --skip-existing
54-
hatch build -t sdist
55-
twine upload ./dist/*.tar.gz --skip-existing
56-
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
11+
12+
runs-on: ${{ matrix.os }}
13+
name: ${{ matrix.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: "3.7"
22+
23+
- name: Install Dependencies
24+
run: |
25+
python -m pip install --upgrade pip pytest
26+
27+
- name: Install UnityPy
28+
run: |
29+
pip install .
30+
31+
- name: Run tests
32+
run: |
33+
pytest -v -s
34+
35+
release:
36+
needs: [test]
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
41+
cp: ["cp37", "cp38", "cp39", "cp310"]
42+
43+
timeout-minutes: 30
44+
45+
runs-on: ${{ matrix.os }}
46+
name: ${{ matrix.os }} - ${{ matrix.cp }}
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@v1
53+
with:
54+
python-version: "3.10"
55+
56+
- name: Install dependencies
57+
run: |
58+
python -m pip install --upgrade pip wheel setuptools hatch
59+
pip install --upgrade twine
60+
61+
- name: Set up QEMU
62+
if: runner.os == 'Linux'
63+
uses: docker/setup-qemu-action@v1
64+
with:
65+
platforms: all
66+
67+
- name: Build wheels
68+
uses: pypa/cibuildwheel@v2.3.1
69+
env:
70+
CIBW_ARCHS_LINUX: auto aarch64
71+
CIBW_BUILD: |
72+
${{ matrix.cp }}-manylinux_x86_64 ${{ matrix.cp }}-manylinux_i686 ${{ matrix.cp }}-manylinux_aarch64 ${{ matrix.cp }}-win_amd64 ${{ matrix.cp }}-win32 ${{ matrix.cp }}-macosx_x86_64
73+
CIBW_REPAIR_WHEEL_COMMAND: "" # Disable auditwheel
74+
CIBW_TEST_REQUIRES: pytest
75+
CIBW_TEST_COMMAND: pytest -v -s {package}/tests
76+
77+
- name: Publish to PyPI
78+
if: success() && github.event_name == 'push' && env.TWINE_PASSWORD != '' && github.ref == 'refs/heads/master'
79+
env:
80+
TWINE_USERNAME: __token__
81+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
82+
run: |
83+
twine upload ./wheelhouse/*.whl --skip-existing
84+
hatch build -t sdist
85+
twine upload ./dist/*.tar.gz --skip-existing

‎UnityPy/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.9.15"
1+
__version__ = "1.9.16"
22

33
from .environment import Environment
44

0 commit comments

Comments
 (0)