Skip to content

bugfix: config encoding - force to utf-8 #389

bugfix: config encoding - force to utf-8

bugfix: config encoding - force to utf-8 #389

Workflow file for this run

name: ci/build
on:
push:
pull_request:
paths-ignore:
- docs/**
- "**/README.md"
jobs:
build_linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9"]
backend: ["amd", "cpu"]
include:
- kbackend: "plaidml.keras.backend"
backend: "amd"
- kbackend: "tensorflow"
backend: "cpu"
exclude:
- python-version: 3.9
backend: amd
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: './requirements/requirements_${{ matrix.backend }}.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint mypy pytest pytest-mock pytest-xvfb wheel
pip install types-attrs types-cryptography types-pyOpenSSL types-PyYAML types-setuptools
pip install -r ./requirements/requirements_${{ matrix.backend }}.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --select=E9,F63,F7,F82 --show-source
# exit-zero treats all errors as warnings.
flake8 . --exit-zero
- name: MyPy Typing
continue-on-error: true
run: |
mypy .
- name: Simple Tests
run: |
if [ "${{ matrix.backend }}" == "amd" ] ; then echo "{\"PLAIDML_DEVICE_IDS\":[\"llvm_cpu.0\"],\"PLAIDML_EXPERIMENTAL\":true}" > ~/.plaidml; fi ;
echo "{\"PLAIDML_DEVICE_IDS\":[\"llvm_cpu.0\"],\"PLAIDML_EXPERIMENTAL\":true}" > ~/.plaidml;
FACESWAP_BACKEND="${{ matrix.backend }}" KERAS_BACKEND="${{ matrix.kbackend }}" py.test -v tests/;
- name: End to End Tests
run: |
FACESWAP_BACKEND="${{ matrix.backend }}" KERAS_BACKEND="${{ matrix.kbackend }}" python tests/simple_tests.py;
if [ "${{ matrix.backend }}" == "amd" ] ; then rm -f ~/.plaidml; fi ;
build_windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
backend: ["cpu", "directml"]
include:
- backend: "cpu"
- backend: "directml"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: './requirements/requirements_${{ matrix.backend }}.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint mypy pytest pytest-mock wheel
pip install types-attrs types-cryptography types-pyOpenSSL types-PyYAML types-setuptools
pip install -r ./requirements/requirements_${{ matrix.backend }}.txt
- name: Set Backend EnvVar
run: echo "FACESWAP_BACKEND=${{ matrix.backend }}" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --select=E9,F63,F7,F82 --show-source
# exit-zero treats all errors as warnings.
flake8 . --exit-zero
- name: MyPy Typing
continue-on-error: true
run: |
mypy .
- name: Simple Tests
run: py.test -v tests
- name: End to End Tests
run: python tests/simple_tests.py