Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload windows wheels to pypi #1024

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-13', 'macos-latest']
os: ['ubuntu-latest', 'macos-13', 'macos-latest', 'windows-2019']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
exclude:
- os: macos-latest
Expand Down Expand Up @@ -95,16 +95,28 @@ jobs:
if: runner.os == 'macOS'
run: pip wheel . --no-deps -w dist

- name: Build Windows Wheel
if: runner.os == 'windows'
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
- name: Install non-windows
if: runner.os != 'windows'
run: pip install dist/*

- name: Run Python tests
- name: Install windows
if: runner.os == 'windows'
run: Get-ChildItem dist\* | ForEach-Object { python.exe -m pip install $_.FullName }

- name: Run Python tests non-windows
if: runner.os != 'windows'
run: |
# Runs tests on installed distribution from an empty directory
python -m pip install -r test_requirements.txt
Expand All @@ -128,6 +140,11 @@ jobs:
# Run tests
python -m pytest python/tests

- name: Run Python tests windows
if: runner.os == 'windows'
run: |
python.exe -c "import resdata; print(resdata.__version__)"


publish:
name: Publish to PyPI
Expand All @@ -149,7 +166,7 @@ jobs:
find artifacts -name "*.whl" -exec mv '{}' dist/ \;

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
password: ${{ secrets.PYPI_TOKEN_RESDATA }}
skip-existing: true