Skip to content

Commit b43032c

Browse files
committed
Enhance conda deployment workflow with matrix support and add PyPI availability check
1 parent 24376e6 commit b43032c

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/cd.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,48 @@ jobs:
3232
uses: pypa/gh-action-pypi-publish@release/v1
3333

3434
conda:
35-
name: build and deploy to conda
35+
name: build and deploy to conda (${{ matrix.os }})
3636
needs: pypi
3737
if: always() && needs.pypi.result == 'success'
3838
runs-on: ${{ matrix.os }}
3939
strategy:
40+
fail-fast: false
4041
matrix:
4142
os: [macOS-latest, ubuntu-latest]
4243
python-version: [3.11]
4344

4445
steps:
46+
- name: Debug matrix info
47+
run: |
48+
echo "Running on: ${{ matrix.os }}"
49+
echo "Python version: ${{ matrix.python-version }}"
50+
echo "Runner OS: ${{ runner.os }}"
51+
4552
- name: Checkout source
4653
uses: actions/checkout@v4
4754

55+
- name: Wait for PyPI propagation
56+
run: |
57+
echo "Waiting for PyPI package to be available..."
58+
PACKAGE_NAME="access-mopper"
59+
VERSION=$(python -c "import versioneer; print(versioneer.get_version())")
60+
echo "Looking for package: ${PACKAGE_NAME}==${VERSION}"
61+
62+
# Wait up to 10 minutes for the package to be available
63+
for i in {1..60}; do
64+
echo "Attempt $i/60: Checking PyPI availability..."
65+
if pip index versions ${PACKAGE_NAME} 2>/dev/null | grep -q "${VERSION}"; then
66+
echo "✅ Package ${PACKAGE_NAME}==${VERSION} is available on PyPI!"
67+
break
68+
fi
69+
if [ $i -eq 60 ]; then
70+
echo "❌ Package not found on PyPI after 10 minutes"
71+
exit 1
72+
fi
73+
echo "Package not yet available, waiting 10 seconds..."
74+
sleep 10
75+
done
76+
4877
- name: Setup conda environment
4978
uses: conda-incubator/setup-miniconda@v3
5079
with:

0 commit comments

Comments
 (0)