mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Set to checks.yml install and import anki wheels
# Conflicts: # .github/workflows/checks.yml
This commit is contained in:
parent
6cf3b0ca18
commit
1962456821
2 changed files with 33 additions and 19 deletions
50
.github/workflows/checks.yml
vendored
50
.github/workflows/checks.yml
vendored
|
@ -97,23 +97,14 @@ jobs:
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}${{ matrix.SEP }}pyenv
|
path: ${{ github.workspace }}${{ matrix.SEP }}pyenv
|
||||||
key: |
|
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}-14-
|
||||||
${{ runner.os }}-pyenv-
|
|
||||||
${{ hashFiles('**/requirements.*') }}-
|
|
||||||
${{ hashFiles('**/setup.py') }}-
|
|
||||||
${{ hashFiles('**/Makefile') }}-14-
|
|
||||||
|
|
||||||
# Disabling these caches for now because they do not seem to be used/help
|
- name: Cache pip wheels
|
||||||
# https://github.com/ankitects/anki/pull/528
|
if: matrix.BUILD_TYPE == 'build'
|
||||||
# - name: Cache pip wheels
|
uses: actions/cache@v1
|
||||||
# if: matrix.BUILD_TYPE == 'build'
|
with:
|
||||||
# uses: actions/cache@v1
|
path: ${{ matrix.PIP_WHEELS_DIR }}
|
||||||
# with:
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-14-
|
||||||
# path: ${{ matrix.PIP_WHEELS_DIR }}
|
|
||||||
# key: |
|
|
||||||
# ${{ runner.os }}-pip-wheels-
|
|
||||||
# ${{ hashFiles('**/requirements.txt') }}-
|
|
||||||
# ${{ hashFiles('**/setup.py') }}-14-
|
|
||||||
|
|
||||||
- name: Cache cargo index
|
- name: Cache cargo index
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
|
@ -237,6 +228,7 @@ jobs:
|
||||||
- name: Set up Ubuntu ripgrep, pyaudio, gettext, rename
|
- name: Set up Ubuntu ripgrep, pyaudio, gettext, rename
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
|
set -x
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install portaudio19-dev gettext rename
|
sudo apt install portaudio19-dev gettext rename
|
||||||
sudo snap install ripgrep --classic
|
sudo snap install ripgrep --classic
|
||||||
|
@ -244,6 +236,7 @@ jobs:
|
||||||
- name: Set up brew ripgrep, pyaudio, gettext, rename
|
- name: Set up brew ripgrep, pyaudio, gettext, rename
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
|
set -x
|
||||||
brew install portaudio protobuf gettext rename ripgrep make
|
brew install portaudio protobuf gettext rename ripgrep make
|
||||||
brew link gettext --force
|
brew link gettext --force
|
||||||
|
|
||||||
|
@ -263,16 +256,35 @@ jobs:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
|
||||||
- run: make develop
|
- run: make develop
|
||||||
if: matrix.BUILD_TYPE != 'check'
|
if: matrix.BUILD_TYPE == 'build'
|
||||||
|
|
||||||
- run: make 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
|
- run: make check
|
||||||
if: matrix.BUILD_TYPE == 'check'
|
if: matrix.BUILD_TYPE == 'check'
|
||||||
|
|
||||||
- name: Upload python wheels
|
- name: Upload python wheels
|
||||||
if: matrix.BUILD_TYPE != 'check'
|
if: matrix.BUILD_TYPE == 'build'
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.ANKI_PYTHON_WHEELS }}
|
name: ${{ matrix.ANKI_PYTHON_WHEELS }}
|
||||||
|
|
|
@ -44,6 +44,8 @@ setuptools.setup(
|
||||||
"pyaudio",
|
"pyaudio",
|
||||||
"markdown",
|
"markdown",
|
||||||
"jsonschema",
|
"jsonschema",
|
||||||
|
"pyqt5",
|
||||||
|
"pyqtwebengine",
|
||||||
'psutil; sys.platform == "win32"',
|
'psutil; sys.platform == "win32"',
|
||||||
'pywin32; sys.platform == "win32"',
|
'pywin32; sys.platform == "win32"',
|
||||||
'darkdetect; sys.platform == "darwin"',
|
'darkdetect; sys.platform == "darwin"',
|
||||||
|
|
Loading…
Reference in a new issue