Build and Deploy QuickFIX (Ninja, DB/XML support) #3
This file contains hidden or 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 and Deploy QuickFIX (Ninja, DB/XML support) | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13'] | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Ninja | |
| run: choco install ninja | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools==65.7.0 wheel cibuildwheel cmake | |
| - name: Ensure Visual Studio 2019 is installed | |
| run: | | |
| choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional" | |
| choco install vswhere | |
| - name: Install OpenSSL | |
| run: choco install openssl | |
| - name: Install ODBC, MySQL, PostgreSQL and libxml2 SDKs | |
| run: | | |
| choco install mysql | |
| choco install postgresql | |
| choco install libxml2 | |
| choco install unixodbc | |
| - name: Download QuickFIX source archive | |
| run: | | |
| curl -L -o quickfix.zip https://github.com/quickfix/quickfix/archive/refs/tags/v1.15.1.zip | |
| - name: Extract QuickFIX sources | |
| run: | | |
| mkdir quickfix | |
| tar -xf quickfix.zip -C quickfix | |
| - name: Enable DB/XML support in config_windows.h | |
| run: | | |
| cd quickfix/src | |
| echo "#define HAVE_ODBC 1" >> config_windows.h | |
| echo "#define HAVE_MYSQL 1" >> config_windows.h | |
| echo "#define HAVE_POSTGRESQL 1" >> config_windows.h | |
| echo "#define HAVE_LIBXML 1" >> config_windows.h | |
| - name: Build QuickFIX C++ library (Ninja, with DB/XML support) | |
| run: | | |
| mkdir quickfix/build | |
| cd quickfix/build | |
| cmake -G "Ninja" -DHAVE_SSL=ON -DCMAKE_INSTALL_PREFIX="C:/quickfix" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=17 .. | |
| ninja | |
| ninja install | |
| - name: Build QuickFIX Python wheel for ${{ matrix.python-version }} | |
| run: | | |
| cd quickfix/python | |
| python -m pip install --upgrade pip setuptools wheel | |
| python setup.py build_ext --inplace | |
| python setup.py bdist_wheel | |
| - name: Upload wheel artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: quickfix-wheel-py${{ matrix.python-version }} | |
| path: quickfix/python/dist/*.whl |