Skip to content

Commit

Permalink
[#117] Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Oct 24, 2021
1 parent 19ea31b commit c116ab8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c116ab8

Please sign in to comment.