Skip to content

Commit

Permalink
Enable debug logging for pypi publish (#896)
Browse files Browse the repository at this point in the history
Indentation wasn't quite the same in this file compared to others
  • Loading branch information
robert3005 authored Sep 20, 2024
1 parent 2350e97 commit 196a776
Showing 1 changed file with 88 additions and 87 deletions.
175 changes: 88 additions & 87 deletions .github/workflows/publish-vortex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,105 +6,106 @@ jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cleanup
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-python
- name: rust-toolchain
shell: bash
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: x86_64
args: --release --interpreter python3.11 --sdist
- name: Build wheels - aarch64
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: aarch64 # NB: aarch64 becomes arm64 in the wheel's platform tag.
args: --release --interpreter python3.11
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: universal2-apple-darwin
args: --release --interpreter python3.11
- name: test wheel
run: |
set -ex
source .venv/bin/activate
ls -al target/wheels
- uses: actions/checkout@v4
- uses: ./.github/actions/cleanup
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-python
- name: rust-toolchain
shell: bash
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: x86_64
args: --release --interpreter python3.11 --sdist
- name: Build wheels - aarch64
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: aarch64 # NB: aarch64 becomes arm64 in the wheel's platform tag.
args: --release --interpreter python3.11
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: universal2-apple-darwin
args: --release --interpreter python3.11
- name: test wheel
run: |
set -ex
source .venv/bin/activate
ls -al target/wheels
echo removing linux_x86_64 if it exists because PyPI will reject the package if it is present
rm -f target/wheels/*linux_x86_64.whl
echo removing linux_x86_64 if it exists because PyPI will reject the package if it is present
rm -f target/wheels/*linux_x86_64.whl
pip install --no-deps --force-reinstall vortex-array --no-index --find-links target/wheels
cd pyvortex/test && pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: osx-wheels
path: target/wheels
pip install --no-deps --force-reinstall vortex-array --no-index --find-links target/wheels
cd pyvortex/test && pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: osx-wheels
path: target/wheels
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# maturin-action builds in an isolated container; setting RUSTC_WRAPPER=sccache triggers failure
# because sccache is not installed in the container.
#
# - uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-python
- name: rust-toolchain
shell: bash
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: x86_64
manylinux: auto
args: --release --interpreter python3.11
- name: test wheel
run: |
set -ex
source .venv/bin/activate
ls -al target/wheels
- uses: actions/checkout@v4
# maturin-action builds in an isolated container; setting RUSTC_WRAPPER=sccache triggers failure
# because sccache is not installed in the container.
#
# - uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-python
- name: rust-toolchain
shell: bash
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: ${{ steps.rust-toolchain.version }}
working-directory: pyvortex
target: x86_64
manylinux: auto
args: --release --interpreter python3.11
- name: test wheel
run: |
set -ex
source .venv/bin/activate
ls -al target/wheels
echo removing linux_x86_64 if it exists because PyPI will reject the package if it is present
rm -f target/wheels/*linux_x86_64.whl
echo removing linux_x86_64 if it exists because PyPI will reject the package if it is present
rm -f target/wheels/*linux_x86_64.whl
pip install --no-deps --force-reinstall vortex-array --no-index --find-links target/wheels
pip install pytest
cd pyvortex/test && pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: target/wheels
pip install --no-deps --force-reinstall vortex-array --no-index --find-links target/wheels
pip install pytest
cd pyvortex/test && pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: target/wheels
release:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
needs: [macos, linux]
needs: [ macos, linux ]
environment:
name: push-to-pypi
url: https://pypi.org/p/vortex-array
steps:
- uses: actions/download-artifact@v4
with:
# https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts
# "To download them to the same directory:"
path: dist/
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
- uses: actions/download-artifact@v4
with:
# https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts
# "To download them to the same directory:"
path: dist/
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
verbose: true

0 comments on commit 196a776

Please sign in to comment.