Skip to content

Commit

Permalink
fix windows wheel VS2019 redist dependence by building with v141
Browse files Browse the repository at this point in the history
  • Loading branch information
daanzu committed Jul 18, 2020
1 parent 4d20fc5 commit 5ee29d8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 16 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Continuous Integration
name: CI

on:
push:
branches: [ build ]
branches: [ master, develop, build ]
pull_request:
branches: [ build ]
branches: [ master, develop, build ]

jobs:

Expand Down Expand Up @@ -78,10 +78,21 @@ jobs:
# uses: wei/wget@v1
# with:
# args: -qO- http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16543/w_mkl_2020.1.216.exe
- name: Setup Kaldi build configuration
- name: Gather information
run: |
echo $GITHUB_WORKSPACE
df -h
ls -al '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/'
ls -al '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.26.28720'
ls -al '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/v142'
# ls -al '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.16.27012/x64/Microsoft.VC141.CRT'
ls -al '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/'*/x64/Microsoft.*.CRT
# ls -alR /c/Program\ Files\ \(x86\)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/
# ls -alR '/c/Program Files (x86)/Microsoft Visual Studio/'2019/Enterprise/VC/Redist/MSVC/
vswhere
vswhere -find 'VC\Redist\**\VC_redist.x64.exe'
- name: Setup Kaldi build configuration
run: |
cd kaldi/windows
cp kaldiwin_mkl.props kaldiwin.props
perl -pi -e 's/<AdditionalDependencies>.*<\/AdditionalDependencies>/<AdditionalDependencies>mkl_sequential.lib;mkl_intel_thread.lib;mkl_core.lib;mkl_intel_lp64.lib;%(AdditionalDependencies)<\/AdditionalDependencies>/g' kaldiwin.props
Expand All @@ -95,13 +106,17 @@ jobs:
# cat variables.props
perl generate_solution.pl --vsver vs2019 --enable-mkl --noportaudio
perl get_version.pl
cd ../..
# find /c -name 'MSBuild.exe'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
# - run: |
# setx VCTargetsPath "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140" /M
# shell: cmd
# find /c -name 'MSBuild.exe'
# - run: |
# rem dir "C:\Program Files (x86)\"
# vswhere.exe -find VC\Redist\**\VC_redist.x64.exe
# zzzzz
# shell: cmd
- name: Install MKL
run: |
mkdir -p mkl
Expand All @@ -112,27 +127,24 @@ jobs:
cat output.txt
# continue-on-error: true
# installdir=
- run: df -h
- name: Build OpenFST
run: msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -maxCpuCount -verbosity:minimal openfst/openfst.sln
run: msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v141 -maxCpuCount -verbosity:minimal openfst/openfst.sln
shell: cmd
- run: df -h
- name: Build Kaldi
run: |
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/kaldi-dragonfly/kaldi-dragonfly.vcxproj
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/compile-graph-agf/compile-graph-agf.vcxproj
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/fstaddselfloops/fstaddselfloops.vcxproj
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v141 -p:WindowsTargetPlatformVersion=10.0.16299.0 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/kaldi-dragonfly/kaldi-dragonfly.vcxproj
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v141 -p:WindowsTargetPlatformVersion=10.0.16299.0 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/compile-graph-agf/compile-graph-agf.vcxproj
msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v141 -p:WindowsTargetPlatformVersion=10.0.16299.0 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin/fstaddselfloops/fstaddselfloops.vcxproj
shell: cmd
# msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin_vs2019.sln
# msbuild -t:Build -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v141 -p:WindowsTargetPlatformVersion=10.0.16299.0 -maxCpuCount -verbosity:minimal kaldi/kaldiwin_vs2019_MKL/kaldiwin_vs2019.sln
# set
# call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
# which msbuild.exe
# set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
# set
# "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\MSBuild.exe"
# dotenv openfst/openfst.sln /build "Release|x64"
# dotenv kaldi/kaldiwin_vs2017_MKL/kaldiwin_vs2017.sln /build "Release|x64"
- run: df -h
# dotenv kaldi/kaldiwin_vs2019_MKL/kaldiwin_vs2019.sln /build "Release|x64"
- name: Build Python wheel
run: |
cd main
Expand All @@ -151,3 +163,12 @@ jobs:
with:
name: wheels
path: main/dist/*
- name: Copy Windows vc_redist
run: |
mkdir -p vc_redist
cp '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.26.28720'/vc_redist.x64.exe vc_redist/
cp '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.26.28720'/x64/Microsoft.*.CRT/* vc_redist/
- uses: actions/upload-artifact@v2
with:
name: vc_redist
path: vc_redist/*
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Smaller binaries: MacOS 11MB -> 7.6MB, Linux 21MB -> 18MB.

### Fixed
* Confidence measurement in the presence of multiple, redundant rules.
* Python3 int division bug for cloud dictation.

## Earlier versions
Expand Down
2 changes: 1 addition & 1 deletion kaldi_active_grammar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

_name = 'kaldi_active_grammar'
__version__ = '1.6.0'
__version__ = '1.6.1'
# __dev_version__ = __version__ + '.dev0'
REQUIRED_MODEL_VERSION = '0.5.0'

Expand Down
4 changes: 4 additions & 0 deletions requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
cmake
ninja
scikit-build>=0.10.0
setuptools
wheel

0 comments on commit 5ee29d8

Please sign in to comment.