Skip to content

Upload windows wheels to pypi #905

Upload windows wheels to pypi

Upload windows wheels to pypi #905

Workflow file for this run

name: Windows Compile
on:
push:
branches:
- main
- 'version-**'
tags: "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-cmake:
name: CMake
strategy:
fail-fast: false
matrix:
os: ['windows-2019']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# required for `git describe --tags` to work
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python.exe -m pip install --upgrade pip
python.exe -m pip install "conan<2"
- name: Build ResData
run: |
python.exe -m pip install -r requirements.txt
mkdir cmake-build
cmake -S . -B cmake-build -G "Visual Studio 16 2019"
cmake --build cmake-build
build-test-wheel:
name: Python
strategy:
fail-fast: false
matrix:
os: ['windows-2019']
python: ['3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# required for `git describe --tags` to work
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Build Windows Wheel
run: |
python.exe -m pip install -U build
python.exe -m build --wheel
- name: Upload wheel as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} Python ${{ matrix.python }} wheel
path: dist/*
- name: Install
run: Get-ChildItem dist\* | ForEach-Object { python.exe -m pip install $_.FullName }
- name: Run Python tests
run: |
python.exe -c "import resdata; print(resdata.__version__)"