-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hosting of built wheel at PyPI - develop (#298)
* Update CHANGELOG.md for version 2.3 * Change version in installation guide * Updated docs to address issue with conda install failing * Lower NumPy and SciPy version for install * Create pypi_test.yaml for automated CDCI with pipit * change name of package * mayavi direct dependency removed refer to github PR for reason direct dependency is added - tested to not be necessary as of now, and removed since that blocks pypi artifact upload #280 (comment) https://stackoverflow.com/questions/54887301/how-can-i-use-git-repos-as-dependencies-for-my-pypi-package * Create pypi_build.yaml * Update and rename pypi_test.yaml to pypi_build_test.yaml * Addressed and incorporated suggestions from review * Deleted as now incorporated into pypi_build * Renamed job to distinguish actions * Name update for readability * Update readme.md for removing pypi_test * Add rewritten aeroforcescalculator.py using flow angle rotation * Fixed FoR issue with aero forces * Removed commented code in AeroForcesCalculator * include also tarball to pypi * update upload/download-artifact to v4 * use older gcc version to improve compatibility * update gcc action to 4.8 * Update pypi_build.yaml * ubuntu bionic runner deprecated * renaming pypi repo to be consistent with documentation https://ic-sharpy.readthedocs.io/ * pypi rename to ic-sharpy * pypi rename to ic-sharpy * pypi rename to ic-sharpy --------- Co-authored-by: Ben Preston <144227999+ben-l-p@users.noreply.github.com> Co-authored-by: Rafa Palacios <rafa_palacios@hotmail.com> Co-authored-by: Ben Preston <blp23@ic.ac.uk>
- Loading branch information
1 parent
7a1ac6a
commit b1ea255
Showing
8 changed files
with
253 additions
and
169 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Create and publish pypi image | ||
|
||
on: | ||
# only runs when there are pushes to develop and main for publishing | ||
# and for testing, pull requests to develop and main | ||
# and if there are changes to the build process and github action | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
paths: | ||
- 'setup.py' | ||
- '.github/workflows/pypi*' | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
- 'rc*' | ||
|
||
jobs: | ||
create-pypi-image: | ||
name: >- | ||
Create .whl 🛞 from SHARPy distribution | ||
runs-on: ubuntu-20.04 | ||
env: | ||
python-version-chosen: "3.10.8" | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ env.python-version-chosen }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.python-version-chosen }} | ||
- name: Set up GCC | ||
uses: egor-tensin/setup-gcc@v1 | ||
with: | ||
version: 7 | ||
platform: x64 | ||
- name: Pre-Install dependencies | ||
run: | | ||
export QT_QPA_PLATFORM='offscreen' | ||
sudo apt install libeigen3-dev | ||
git submodule init | ||
git submodule update | ||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
build | ||
--user | ||
- name: Install wheel | ||
run: python3 -m pip install wheel --user | ||
- name: Build a source tarball | ||
run: python setup.py sdist | ||
- name: Build a binary wheel | ||
run: python3 setup.py bdist_wheel | ||
- name: Find the wheel created during pip install | ||
run: | ||
python3 -m pip cache dir | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes | ||
needs: | ||
- create-pypi-image | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/ic_sharpy # Replace <package-name> with your PyPI project name | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# path: dist/* |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.