Build Windows wheels exiv2 0.28 #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows wheels exiv2 0.28 | |
on: workflow_dispatch | |
jobs: | |
compile: | |
runs-on: windows-2019 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Fetch Gettext | |
run: > | |
c:\msys64\usr\bin\wget.exe -nv | |
/~https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip | |
-O gettext.zip | |
- name: Extract Gettext | |
shell: bash | |
run: | | |
mkdir gettext | |
cd gettext | |
unzip ../gettext.zip | |
- name: Fetch Exiv2 source | |
run: > | |
c:\msys64\usr\bin\wget.exe -nv | |
/~https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.3.tar.gz | |
-O exiv2.tar.gz | |
- name: Extract Exiv2 source | |
shell: bash | |
run: | | |
tar -xzf exiv2.tar.gz | |
mv exiv2-0.28.3 libexiv2 | |
# tweaks to allow NLS | |
echo -e "24a25\n> self.requires('libgettext/0.21')" | | |
c:/msys64/usr/bin/patch.exe libexiv2/conanfile.py | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install cmake | |
uses: jwlawson/actions-setup-cmake@v2 | |
- name: Install ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Compile Exiv2 | |
env: | |
PATH: "${{ github.workspace }}\\gettext\\bin" | |
run: > | |
pip install conan==1.59.0 && | |
cd libexiv2 && | |
cmake --preset msvc | |
-D CMAKE_BUILD_TYPE=Release | |
-D EXIV2_BUILD_SAMPLES=OFF | |
-D EXIV2_BUILD_EXIV2_COMMAND=OFF | |
-D EXIV2_BUILD_UNIT_TESTS=OFF | |
-D EXIV2_ENABLE_NLS=ON | |
-D EXIV2_ENABLE_FILESYSTEM_ACCESS=ON | |
-G "Visual Studio 16 2019" && | |
cmake --build build-msvc --config Release && | |
cmake --install build-msvc --config Release && | |
copy build-msvc\bin\libcurl.dll build-msvc\install\bin | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.16.5 | |
env: | |
CIBW_ARCHS: auto64 | |
CIBW_SKIP: pp3* | |
CIBW_ENVIRONMENT: | | |
EXIV2_ROOT=libexiv2/build-msvc/install | |
CIBW_TEST_COMMAND: > | |
python -m exiv2 -v && | |
python -m unittest discover {project}/tests -v | |
- name: Store results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-28-wheels | |
path: wheelhouse/*.whl |