See More

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