Skip to content

Commit d284084

Browse files
committed
trying more release proces stuff
1 parent 5238519 commit d284084

File tree

2 files changed

+47
-20
lines changed

2 files changed

+47
-20
lines changed

.github/workflows/artifacts.yml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
cache-dependency-path: '**/requirements.dev.txt'
127127
- run: pip install -r python/requirements.dev.txt
128128
- run: maturin build -m python/Cargo.toml
129-
- run: pip install --no-index --find-links=target/wheels/ pyontoenv
129+
- run: pip install --no-index --find-links=target/wheels/ ontoenv
130130
- run: rm -r target/wheels
131131
- run: maturin sdist -m python/Cargo.toml
132132
- uses: actions/upload-artifact@v4
@@ -152,7 +152,7 @@ jobs:
152152
with:
153153
version: stable
154154
- run: sed 's/%arch%/${{ matrix.architecture }}/g' .github/workflows/manylinux_build.sh | sed 's/%for_each_version%/${{ github.event_name == 'release' || '' }}/g' > .github/workflows/manylinux_build_script.sh
155-
- run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/manylinux2014_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/manylinux_build_script.sh
155+
- run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/manylinux_2_28_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/manylinux_build_script.sh
156156
if: github.event_name == 'release' || matrix.architecture == 'x86_64'
157157
- uses: actions/upload-artifact@v4
158158
with:
@@ -211,7 +211,7 @@ jobs:
211211
- run: pip install -r python/requirements.dev.txt
212212
- run: maturin build --release --features abi3
213213
working-directory: ./python
214-
- run: pip install --no-index --find-links=target/wheels/ pyontoenv
214+
- run: pip install --no-index --find-links=target/wheels/ ontoenv
215215
- run: rm -r target/wheels
216216
- run: maturin build --release --target universal2-apple-darwin --features abi3
217217
working-directory: ./python
@@ -244,7 +244,7 @@ jobs:
244244
- run: pip install -r python/requirements.dev.txt
245245
- run: maturin build --release --features abi3
246246
working-directory: ./python
247-
- run: pip install --no-index --find-links=target/wheels/ pyontoenv
247+
- run: pip install --no-index --find-links=target/wheels/ ontoenv
248248
- run: rm -r target/wheels
249249
- run: maturin build --release -m python/Cargo.toml --features abi3
250250
- uses: actions/upload-artifact@v4
@@ -301,15 +301,34 @@ jobs:
301301
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
302302
env:
303303
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
304-
- name: Wait for crate index propagation
305-
run: sleep 45
306-
- name: Publish pyontoenv crate
307-
uses: katyo/publish-crates@v2
308-
with:
309-
path: './python'
310-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
311-
env:
312-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
304+
- name: Wait for crate availability
305+
run: |
306+
set -euo pipefail
307+
VERSION=$(python3 - <<'PY'
308+
import tomllib
309+
from pathlib import Path
310+
with open(Path("Cargo.toml"), "rb") as fh:
311+
data = tomllib.load(fh)
312+
print(data["workspace"]["package"]["version"])
313+
PY
314+
)
315+
for crate in ontoenv ontoenv-cli; do
316+
echo "Waiting for ${crate} ${VERSION} to appear on crates.io..."
317+
success=0
318+
for attempt in {1..10}; do
319+
if curl --silent --fail "https://crates.io/api/v1/crates/${crate}/${VERSION}" >/dev/null; then
320+
echo "${crate} ${VERSION} is available."
321+
success=1
322+
break
323+
fi
324+
echo "Attempt ${attempt}/10: ${crate} ${VERSION} not visible yet; retrying in 30s..."
325+
sleep 30
326+
done
327+
if [ "${success}" -ne 1 ]; then
328+
echo "Timed out waiting for ${crate} ${VERSION} to propagate to crates.io."
329+
exit 1
330+
fi
331+
done
313332
full_archive:
314333
if: github.event_name == 'release'
315334
runs-on: ubuntu-latest
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
# from https://github.com/oxigraph/oxigraph/blob/main/.github/workflows/manylinux_build.sh
2+
set -euxo pipefail
23
cd /workdir
3-
yum -y install centos-release-scl-rh
4-
yum -y install llvm-toolset-7.0
5-
source scl_source enable llvm-toolset-7.0
4+
if command -v dnf >/dev/null 2>&1; then
5+
dnf -y update
6+
dnf -y install clang cmake make gcc-c++
7+
elif command -v yum >/dev/null 2>&1; then
8+
yum -y update
9+
yum -y install clang cmake make gcc-c++
10+
else
11+
echo "No supported package manager found (dnf/yum)" >&2
12+
exit 1
13+
fi
614
curl https://static.rust-lang.org/rustup/dist/%arch%-unknown-linux-gnu/rustup-init --output rustup-init
715
chmod +x rustup-init
816
./rustup-init -y --profile minimal --default-toolchain stable
917
source "$HOME/.cargo/env"
10-
export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin"
18+
export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:/opt/python/cp312-cp312/bin"
1119
cd python
1220
python3.12 -m venv venv
1321
source venv/bin/activate
1422
pip install -r requirements.dev.txt
1523
maturin develop --release
16-
maturin build --release --features abi3 --compatibility manylinux2014
24+
maturin build --release --features abi3 --compatibility manylinux_2_28
1725
if [ %for_each_version% ]; then
1826
for VERSION in 8 9 10 11 12; do
19-
maturin build --release --interpreter "python3.$VERSION" --compatibility manylinux2014
27+
maturin build --release --interpreter "python3.$VERSION" --compatibility manylinux_2_28
2028
done
2129
for VERSION in 9 10; do
22-
maturin build --release --interpreter "pypy3.$VERSION" --compatibility manylinux2014
30+
maturin build --release --interpreter "pypy3.$VERSION" --compatibility manylinux_2_28
2331
done
2432
fi

0 commit comments

Comments
 (0)