Set to checks.yml install and import anki wheels

# Conflicts:
#	.github/workflows/checks.yml
This commit is contained in:
evandrocoan 2020-03-28 13:32:21 -03:00
parent 6cf3b0ca18
commit 1962456821
2 changed files with 33 additions and 19 deletions

View file

@ -97,23 +97,14 @@ jobs:
uses: actions/cache@v1
with:
path: ${{ github.workspace }}${{ matrix.SEP }}pyenv
key: |
${{ runner.os }}-pyenv-
${{ hashFiles('**/requirements.*') }}-
${{ hashFiles('**/setup.py') }}-
${{ hashFiles('**/Makefile') }}-14-
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}-14-
# Disabling these caches for now because they do not seem to be used/help
# https://github.com/ankitects/anki/pull/528
# - name: Cache pip wheels
# if: matrix.BUILD_TYPE == 'build'
# uses: actions/cache@v1
# with:
# path: ${{ matrix.PIP_WHEELS_DIR }}
# key: |
# ${{ runner.os }}-pip-wheels-
# ${{ hashFiles('**/requirements.txt') }}-
# ${{ hashFiles('**/setup.py') }}-14-
- name: Cache pip wheels
if: matrix.BUILD_TYPE == 'build'
uses: actions/cache@v1
with:
path: ${{ matrix.PIP_WHEELS_DIR }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-14-
- name: Cache cargo index
uses: actions/cache@v1
@ -237,6 +228,7 @@ jobs:
- name: Set up Ubuntu ripgrep, pyaudio, gettext, rename
if: matrix.os == 'ubuntu-latest'
run: |
set -x
sudo apt update
sudo apt install portaudio19-dev gettext rename
sudo snap install ripgrep --classic
@ -244,6 +236,7 @@ jobs:
- name: Set up brew ripgrep, pyaudio, gettext, rename
if: matrix.os == 'macos-latest'
run: |
set -x
brew install portaudio protobuf gettext rename ripgrep make
brew link gettext --force
@ -263,16 +256,35 @@ jobs:
node-version: 12
- run: make develop
if: matrix.BUILD_TYPE != 'check'
if: matrix.BUILD_TYPE == 'build'
- run: make build
if: matrix.BUILD_TYPE != 'check'
if: matrix.BUILD_TYPE == 'build'
- name: Check Windows wheels
if: matrix.BUILD_TYPE == 'build' && matrix.os == 'windows-latest'
shell: cmd
run: |
echo on
copy %pyaudio% dist
python -m pip install %pyaudio%
cd dist
cmd /C for /R %%i in (*.whl) DO python -m pip install "%%i"
python -c "import aqt; # aqt.run()"
- name: Check Linux/Mac OS wheels
if: matrix.BUILD_TYPE == 'build' && ( matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' )
run: |
set -x
cd dist
python -m pip install *
python -c "import aqt; # aqt.run()"
- run: make check
if: matrix.BUILD_TYPE == 'check'
- name: Upload python wheels
if: matrix.BUILD_TYPE != 'check'
if: matrix.BUILD_TYPE == 'build'
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.ANKI_PYTHON_WHEELS }}

View file

@ -44,6 +44,8 @@ setuptools.setup(
"pyaudio",
"markdown",
"jsonschema",
"pyqt5",
"pyqtwebengine",
'psutil; sys.platform == "win32"',
'pywin32; sys.platform == "win32"',
'darkdetect; sys.platform == "darwin"',