Skip to content
Merged
Show file tree
Hide file tree
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
42 changes: 24 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@
name: Deploy Release

on:
push:
tags:
- '*'

# This is for debugging.
# on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
workflow_dispatch:
release:
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}

jobs:
wheels:
runs-on: ubuntu-latest
Expand All @@ -35,7 +24,7 @@ jobs:
python-version: "3.12"

- name: Install Dependencies
run: python3 -m pip install build twine numpy
run: python3 -m pip install build numpy

- name: Install Package
run: python3 -m pip install .
Expand All @@ -49,6 +38,23 @@ jobs:
- name: Build wheels
run: python3 -m build --wheel

- name: Upload to PyPI
run: |
python -m twine upload dist/*.tar.gz && python -m twine upload dist/pshmem*.whl
- uses: actions/upload-artifact@v4
with:
name: pshmem
path: ./dist/pshmem*.whl

upload_pypi:
needs: wheels
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v5
with:
# Unpacks all artifacts into dist/
pattern: pshmem-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
10 changes: 2 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,11 @@ jobs:
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& mkdir -p test \
&& pushd test >/dev/null 2>&1 \
&& MPI_DISABLE=1 python3 -c 'import pshmem.test; pshmem.test.run()' \
&& popd >/dev/null 2>&1
&& MPI_DISABLE=1 python3 -c 'import pshmem.test; pshmem.test.run()'

- name: Run MPI Tests
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& mkdir -p test \
&& pushd test >/dev/null 2>&1 \
&& mpirun -np 1 python3 -c 'import pshmem.test; pshmem.test.run()' \
&& mpirun -np 2 python3 -c 'import pshmem.test; pshmem.test.run()' \
&& popd >/dev/null 2>&1
&& mpirun -np 2 python3 -c 'import pshmem.test; pshmem.test.run()'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated sources
src/pshmem/_version.py

# Python binary
*__pycache__
*.pyc
Loading