-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7585247
commit 65838cd
Showing
5 changed files
with
87 additions
and
47 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
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 |
---|---|---|
|
@@ -15,11 +15,16 @@ on: | |
|
||
jobs: | ||
sdist: | ||
permissions: | ||
contents: read | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
submodules: 'recursive' | ||
|
||
- name: Build source distribution (sdist) | ||
|
@@ -33,65 +38,64 @@ jobs: | |
|
||
wheel: | ||
runs-on: ubuntu-latest | ||
container: condaforge/linux-anvil-cos7-x86_64 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
permissions: | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
shell: ${{ matrix.shell || 'bash -l {0}' }} | ||
|
||
env: | ||
# https://github.com/actions/checkout/issues/1809 | ||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | ||
|
||
steps: | ||
# Check latest git version at https://github.com/search?q=org%3Aiusrepo+topic%3Arpm+git&s=updated&type=repositories | ||
- name: Install Latest Git | ||
run: | | ||
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm | ||
sudo yum remove git -y | ||
sudo yum install -y git236 | ||
sudo add-apt-repository ppa:git-core/ppa -y | ||
sudo apt-get update | ||
sudo apt-get install git -y | ||
- name: Check Git version | ||
run: git --version | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
submodules: 'recursive' | ||
|
||
- name: Create environment | ||
run: >- | ||
mamba create -n wheel-${{ matrix.python }} | ||
--yes | ||
python=${{ matrix.python }} | ||
auditwheel | ||
c-compiler | ||
cxx-compiler | ||
fortran-compiler | ||
cffi | ||
cmake | ||
make | ||
meson | ||
ninja | ||
numpy | ||
pip | ||
python-build | ||
pkgconfig | ||
patchelf | ||
unzip | ||
wheel | ||
- name: Setup Python | ||
uses: mamba-org/setup-micromamba@v2 | ||
with: | ||
init-shell: bash | ||
environment-name: py${{ matrix.python }} | ||
create-args: >- | ||
python=${{ matrix.python }} | ||
auditwheel | ||
c-compiler | ||
cxx-compiler | ||
fortran-compiler | ||
cffi | ||
cmake | ||
make | ||
meson | ||
ninja | ||
numpy | ||
pip | ||
python-build | ||
pkgconfig | ||
patchelf | ||
unzip | ||
wheel | ||
- name: Build wheel (bdist) | ||
run: | | ||
conda activate wheel-${{ matrix.python }} | ||
set -ex | ||
python -m build --wheel | ||
auditwheel show dist/*.whl | ||
auditwheel repair -w wheels --plat ${{ env.plat }} dist/*.whl | ||
auditwheel repair -w wheels --plat $plat dist/*.whl | ||
env: | ||
plat: manylinux2014_x86_64 | ||
|
||
|
@@ -102,9 +106,17 @@ jobs: | |
path: wheels/*.whl | ||
|
||
|
||
upload_pypi: | ||
needs: [wheel, sdist] | ||
upload_test_pypi: | ||
needs: [sdist, wheel] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: release | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Download build artifacts | ||
|
@@ -115,12 +127,25 @@ jobs: | |
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
upload_pypi: | ||
needs: [sdist, wheel, upload_test_pypi] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: release | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: dist | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
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