Skip to content

Windows wheels

Windows wheels #851

Workflow file for this run

name: Windows wheels
on:
push:
branches: [ "*" ]
tags: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '15 1 * * *'
# the prefix and version numbers for the branches need to be manually copied (for now) from:
# http://monetdb.org/testweb/web/status.php
# Install-Binary -Url "http://monetdb.org/testweb/web/${{ env.MSI }}" -Name "${{ env.MSI }}" -ArgumentList "/norestart /quiet /passive /qn INSTALLLEVEL=1000 INSTALLDIR=$HOME\MonetDB"
jobs:
windows-monetdb-build:
runs-on: windows-latest
strategy:
matrix:
include:
- MONETDB_BRANCH: default
MONETDB_WIN_VERSION: latest
env:
MSI: MonetDB5-SQL-Installer-x86_64-${{ matrix.MONETDB_BRANCH }}-${{ matrix.MONETDB_WIN_VERSION }}.msi
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Install monetdb
shell: pwsh
run: |
$msifile="c:\${{ env.MSI }}"
#New-Item -Path 'C:\test.log' -ItemType File
(New-Object System.Net.WebClient).DownloadFile("http://monetdb.org/testweb/web/${{ env.MSI }}","$msifile");
$procMain = Start-Process "$msifile" -ArgumentList '/quiet /passive /qn /norestart INSTALLLEVEL=1000 MSIRMSHUTDOWN=2' -Wait
#$procMain = Start-Process "$msifile" -ArgumentList '/quiet /passive /qn /norestart INSTALLLEVEL=1000 MSIRMSHUTDOWN=2 /L*xv c:\test.log'
#$procLog = Start-Process powershell 'Get-Content -Path c:\test.log -Wait' -NoNewWindow -PassThru
#$procMain.WaitForExit()
#$procLog.Kill()
# Install-Binary -Url "http://monetdb.org/testweb/web/${{ env.MSI }}" -Name "${{ env.MSI }}" -ArgumentList "/norestart /quiet /passive /qn INSTALLLEVEL=1000"
-
name: check monetdb
shell: pwsh
run: |
ls "C:\Program Files\MonetDB\MonetDB5"
- uses: actions/upload-artifact@v4
with:
name: monetdb-win-${{ matrix.MONETDB_BRANCH }}
path: 'C:\Program Files\MonetDB'
windows-wheel:
needs: windows-monetdb-build
runs-on: windows-2022
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.11", "3.12" ]
branch: [ default ]
env:
MONETDB_BRANCH: ${{ matrix.branch }}
MONETDBE_INCLUDE_PATH: 'C:\Program FIles\MonetDB\MonetDB5\include'
MONETDBE_LIBRARY_PATH: 'C:\Program FIles\MonetDB\MonetDB5\lib'
steps:
-
name: Print monetdbe branch variable to make sure it is set properly
run: echo $MONETDB_BRANCH
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
-
uses: actions/download-artifact@v4
with:
name: monetdb-win-${{ matrix.branch }}
path: 'C:\Program Files\MonetDB'
-
name: list include
run: |
ls 'C:\Program Files\MonetDB\MonetDB5\include\monetdb\monetdbe.h'
-
name: Collect DLLs
run: |
ls 'C:\Program Files\MonetDB\MonetDB5\bin'
Copy-Item 'C:\Program Files\MonetDB\MonetDB5\bin\*.dll' monetdbe\.
ls monetdbe
-
name: Upgrade pip and wheel for all pythons
run: python3 -m pip install --upgrade pip wheel dll-diagnostics build
-
name: Build binary python extension
run: python3 setup.py build_ext --include-dirs='C:\Program Files\MonetDB\MonetDB5\include' --library-dirs='C:\Program Files\MonetDB\MonetDB5\lib'
-
name: Install MonetDBe in developer mode
run: python3 -m pip install -e .[test]
-
name: Run DLL diagnostics
run: |
dlldiag.exe deps .\monetdbe\_lowlevel.pyd
-
name: Make wheel
run: python3 setup.py sdist bdist_wheel
-
uses: actions/upload-artifact@v4
name: Publish Windows binary wheels
with:
name: monetdbe-win-wheel-${{ matrix.branch }}-${{ matrix.python-version }}
path: dist/*.whl
-
name: Print version info
run: python3 -c "from monetdbe._cffi.util import print_info; print_info()"
-
name: Run tests
run: pytest