1414 # list of github vm: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
1515 fail-fast : false
1616 matrix :
17- python-version : ["3.9", "3. 10", "3.11", "3.12"]
17+ python-version : ["3.10", "3.11", "3.12"]
1818
1919 os :
2020 - name : " ubuntu-latest"
@@ -51,11 +51,21 @@ jobs:
5151
5252 - name : Setup Python
5353 uses : actions/setup-python@v5
54+ id : py
5455 with :
5556 python-version : ${{ matrix.python-version }}
57+ update-environment : false
5658
5759 - name : Install Poetry
58- run : python -m pip install poetry==1.8.3
60+ run : |
61+ which python
62+ python --version
63+ which python3
64+ python3 --version
65+ echo "pythonpath: ${{ steps.py.outputs.python-path }}"
66+ ${{ steps.py.outputs.python-path }} --version
67+ pipx install poetry==1.8.3
68+ poetry env use ${{ steps.py.outputs.python-path }}
5969
6070 - name : Set up custom PATH and set py version to cpXYZ [windows]
6171 if : ${{matrix.os.platform_id == 'win_amd64'}}
@@ -97,9 +107,15 @@ jobs:
97107 CIBW_ENVIRONMENT : " MACOSX_DEPLOYMENT_TARGET=${{ matrix.os.macos_version }}.0"
98108 ARCHFLAGS : -arch x86_64
99109 BUILD_THREADS : " 4"
110+ PYTORCH_MPS_HIGH_WATERMARK_RATIO : " 0.0"
100111 run : |
101- echo "Building wheel ${CIBW_BUILD}"
112+ PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)')
113+ echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}"
114+ echo "Building cp: ${{ env.python_cp_version }}"
115+ echo "Building cache_tag: ${PY_CACHE_TAG}"
116+ echo "Building platform_id: ${{ matrix.os.platform_id }}"
102117 poetry run python --version
118+ poetry run python --version | grep ${{ matrix.python-version }}
103119 poetry install --no-root --only=build
104120 cat ./pyproject.toml
105121 poetry run python -m cibuildwheel --output-dir wheelhouse
@@ -115,6 +131,10 @@ jobs:
115131 for file in ./wheelhouse/*.whl; do
116132 echo "Inspecting $file"
117133 poetry run python -m zipfile --list "$file"
134+ echo "Checking if .so is contained in the wheel"
135+ poetry run python -m zipfile --list "$file" | grep \\.so
136+ echo "Checking if the correct python version is contained in the wheel"
137+ poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG}
118138 done
119139 mkdir -p ./dist
120140 cp wheelhouse/*.whl ./dist/
@@ -137,9 +157,16 @@ jobs:
137157 CIBW_ENVIRONMENT : " MACOSX_DEPLOYMENT_TARGET=${{ matrix.os.macos_version }}.0"
138158 ARCHFLAGS : -arch arm64
139159 BUILD_THREADS : " 4"
160+ PYTORCH_MPS_HIGH_WATERMARK_RATIO : " 0.0"
161+ CUDA_VISIBLE_DEVICES : " cpu"
140162 run : |
141- echo "Building wheel ${CIBW_BUILD}"
163+ PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)')
164+ echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}"
165+ echo "Building cp: ${{ env.python_cp_version }}"
166+ echo "Building cache_tag: ${PY_CACHE_TAG}"
167+ echo "Building platform_id: ${{ matrix.os.platform_id }}"
142168 poetry run python --version
169+ poetry run python --version | grep ${{ matrix.python-version }}
143170 poetry install --no-root --only=build
144171 cat ./pyproject.toml
145172 poetry run python -m cibuildwheel --output-dir wheelhouse
@@ -155,6 +182,10 @@ jobs:
155182 for file in ./wheelhouse/*.whl; do
156183 echo "Inspecting $file"
157184 poetry run python -m zipfile --list "$file"
185+ echo "Checking if .so is contained in the wheel"
186+ poetry run python -m zipfile --list "$file" | grep \\.so
187+ echo "Checking if the correct python version is contained in the wheel"
188+ poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG}
158189 done
159190 mkdir -p ./dist
160191 cp wheelhouse/*.whl ./dist/
@@ -183,15 +214,23 @@ jobs:
183214 CIBW_BUILD_VERBOSITY : 3
184215 BUILD_THREADS : " 8"
185216 run : |
186- echo "Building wheel ${CIBW_BUILD}"
217+ PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)')
218+ echo "Building cp: ${{ env.python_cp_version }}"
219+ echo "Building cache_tag: ${PY_CACHE_TAG}"
220+ echo "Building platform_id: ${{ matrix.os.platform_id }}"
187221 poetry run python --version
222+ poetry run python --version | grep ${{ matrix.python-version }}
188223 poetry install --no-root --only=build
189224 cat ./pyproject.toml
190225 poetry run python -m cibuildwheel --output-dir ./wheelhouse
191226 ls -l ./wheelhouse
192227 for file in ./wheelhouse/*.whl; do
193228 echo "Inspecting $file"
194229 poetry run python -m zipfile --list "$file"
230+ echo "Checking if .so is contained in the wheel"
231+ poetry run python -m zipfile --list "$file" | grep \\.so
232+ echo "Checking if the correct python version is contained in the wheel"
233+ poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG}
195234 done
196235 mkdir -p ./dist
197236 cp wheelhouse/*.whl ./dist/
@@ -256,9 +295,9 @@ jobs:
256295
257296 - name : publish wheels (dry run)
258297 run : |
259- poetry publish --dry-run --no-interaction -vvv
298+ poetry publish --skip-existing -- dry-run --no-interaction -vvv
260299
261300 - name : publish wheels (on publishing) [for releases only]
262301 if : ${{ startsWith(github.ref, 'refs/tags/') }}
263302 run : |
264- poetry publish --no-interaction -vvv
303+ poetry publish --skip-existing -- no-interaction -vvv
0 commit comments