[#117] Windows CI

This commit is contained in:
Lawrence Hudson 2021-10-24 20:25:35 +01:00
parent 19ea31bd8f
commit c116ab843f
2 changed files with 11 additions and 4 deletions

View File

@ -49,11 +49,17 @@ jobs:
- name: Download 32-bit DLLs
if: ${{ runner.os == 'Windows' && matrix.architecture == 'x86' }}
run: wget https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libzbar-32.dll https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libiconv-2.dll --directory-prefix pyzbar/
run: |
cd pyzbar
curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/{libzbar-32.dll,libiconv-2.dll}"
cd ..
- name: Download 64-bit DLLs
if: ${{ runner.os == 'Windows' && matrix.architecture == 'x64' }}
run: wget https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libzbar-64.dll https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libiconv.dll --directory-prefix pyzbar/
run: |
cd pyzbar
curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/{libzbar-64.dll,libiconv.dll}"
cd ..
- name: Run tests
run: pytest --verbose --cov=pyzbar pyzbar

View File

@ -3,10 +3,11 @@ rm -rf build dist MANIFEST.in pyzbar.egg-info
cp MANIFEST.in.all MANIFEST.in
./setup.py bdist_wheel
DLL_ROOT=https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1
if [ ! -f pyzbar/libzbar-32.dll ]; then
echo Fetch DLLs
wget $DLL_ROOT/libzbar-32.dll $DLL_ROOT/libiconv-2.dll $DLL_ROOT/libzbar-64.dll $DLL_ROOT/libiconv.dll --directory-prefix pyzbar/
cd pyzbar
curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/{libzbar-32.dll,libiconv-2.dll,libzbar-64.dll,libiconv.dll}"
cd ..
fi
echo Windows 32-bit wheel