Skip to content

Commit 8c327f8

Browse files
committed
try again
1 parent 7552435 commit 8c327f8

File tree

1 file changed

+93
-57
lines changed

1 file changed

+93
-57
lines changed

.github/workflows/python-publish.yml

+93-57
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,88 @@
55
#
66
name: Python publish
77

8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
id-token: write
21+
22+
jobs:
23+
linux:
24+
runs-on: ${{ matrix.platform.runner }}
25+
strategy:
26+
matrix:
27+
platform:
28+
- runner: ubuntu-22.04
29+
target: x86_64
30+
# - runner: ubuntu-22.04
31+
# target: x86
32+
# - runner: ubuntu-22.04
33+
# target: aarch64
34+
# - runner: ubuntu-22.04
35+
# target: armv7
36+
# - runner: ubuntu-22.04
37+
# target: s390x
38+
# - runner: ubuntu-22.04
39+
# target: ppc64le
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: 3.x
45+
- name: Build wheels
46+
uses: PyO3/maturin-action@v1
47+
with:
48+
target: ${{ matrix.platform.target }}
49+
args: --release --out dist --find-interpreter
50+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
51+
manylinux: auto
52+
- name: Upload wheels
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: wheels-linux-${{ matrix.platform.target }}
56+
path: dist
57+
- name: pytest
58+
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
59+
shell: bash
60+
run: |
61+
set -e
62+
python3 -m venv .venv
63+
source .venv/bin/activate
64+
pip install hdf5_nuclear_data_reader --find-links dist --force-reinstall
65+
pip install pytest
66+
pytest
67+
- name: pytest
68+
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
69+
uses: uraimo/run-on-arch-action@v2
70+
with:
71+
arch: ${{ matrix.platform.target }}
72+
distro: ubuntu22.04
73+
githubToken: ${{ github.token }}
74+
install: |
75+
apt-get update
76+
apt-get install -y --no-install-recommends python3 python3-pip
77+
pip3 install -U pip pytest
78+
run: |
79+
set -e
80+
pip3 install hdf5_nuclear_data_reader --find-links dist --force-reinstall
81+
pytest
82+
83+
# This file is autogenerated by maturin v1.8.2
84+
# To update, run
85+
#
86+
# maturin generate-ci github -o .github/workflows/python-publish.yml --pytest
87+
#
88+
name: Python publish
89+
890
on:
991
push:
1092
branches:
@@ -104,6 +186,13 @@ jobs:
104186
toolchain: stable
105187
override: true
106188
target: x86_64-unknown-linux-musl
189+
- name: Verify maturin in Docker
190+
run: |
191+
docker run \
192+
-v $(pwd):/io \
193+
-w /io \
194+
ghcr.io/pyo3/maturin:main \
195+
maturin --version
107196
- name: Build wheels with custom Docker
108197
env:
109198
HDF5_DISABLE_VERSION_CHECK: "1"
@@ -131,68 +220,15 @@ jobs:
131220
-e H5_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT="" \
132221
-e H5_LDOUBLE_TO_LONG_SPECIAL_RUN=0 \
133222
-e H5_LDOUBLE_TO_LONG_SPECIAL_RUN__TRYRUN_OUTPUT="" \
134-
-e H5_LONG_TO_LDOUBLE_SPECIAL_RUN=0 \
135-
-e H5_LONG_TO_LDOUBLE_SPECIAL_RUN__TRYRUN_OUTPUT="" \
136-
-e H5_LDOUBLE_TO_LLONG_ACCURATE_RUN=0 \
137-
-e H5_LDOUBLE_TO_LLONG_ACCURATE_RUN__TRYRUN_OUTPUT="" \
138-
-e H5_LLONG_TO_LDOUBLE_CORRECT_RUN=0 \
139-
-e H5_LLONG_TO_LDOUBLE_CORRECT_RUN__TRYRUN_OUTPUT="" \
140-
-e H5_DISABLE_SOME_LDOUBLE_CONV_RUN=0 \
141-
-e H5_DISABLE_SOME_LDOUBLE_CONV_RUN__TRYRUN_OUTPUT="" \
142-
-e H5_NO_ALIGNMENT_RESTRICTIONS_RUN=0 \
143-
-e H5_NO_ALIGNMENT_RESTRICTIONS_RUN__TRYRUN_OUTPUT="" \
144-
-w /io \
145-
ghcr.io/pyo3/maturin:main \
146-
maturin build --release --target x86_64-unknown-linux-musl --out dist --find-interpreter --verbose
147-
- name: Upload wheels
148-
uses: actions/upload-artifact@v4
149-
with:
150-
name: wheels-musllinux-${{ matrix.platform.target }}
151-
path: dist
152-
- name: Upload build logs
153-
if: always() # Upload even on failure for debugging
154-
uses: actions/upload-artifact@v4
155-
with:
156-
name: build-logs-musllinux-${{ matrix.platform.target }}
157-
path: target/x86_64-unknown-linux-musl/release/build/hdf5-src-*/out/build/CMakeFiles/
158-
- name: pytest
159-
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
160-
uses: addnab/docker-run-action@v3
161-
with:
162-
image: alpine:latest
163-
options: -v ${{ github.workspace }}:/io -w /io
164-
run: |
165-
set -e
166-
apk add py3-pip py3-virtualenv
167-
python3 -m virtualenv .venv
168-
source .venv/bin/activate
169-
pip install hdf5_nuclear_data_reader --no-index --find-links dist --force-reinstall
170-
pip install pytest
171-
pytest
172-
- name: pytest
173-
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
174-
uses: uraimo/run-on-arch-action@v2
175-
with:
176-
arch: ${{ matrix.platform.target }}
177-
distro: alpine_latest
178-
githubToken: ${{ github.token }}
179-
install: |
180-
apk add py3-virtualenv
181-
run: |
182-
set -e
183-
python3 -m virtualenv .venv
184-
source .venv/bin/activate
185-
pip install pytest
186-
pip install hdf5_nuclear_data_reader --find-links dist --force-reinstall
187-
pytest
188-
223+
-e H5_LONG_TO_LDOUBLE_SPECIAL
224+
189225
windows:
190226
runs-on: ${{ matrix.platform.runner }}
191227
strategy:
192228
matrix:
193229
platform:
194-
- runner: windows-latest
195-
target: x64
230+
# - runner: windows-latest
231+
# target: x64
196232
- runner: windows-latest
197233
target: x86
198234
steps:

0 commit comments

Comments
 (0)