2323 name : " ${{ matrix.os }}: Python ${{ matrix.python-version }}"
2424 strategy :
2525 matrix :
26- python-version : ["3.7 ", "3.8 ", "3.9 ", "3.10", "3.11 "]
26+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 "]
2727 os : ["ubuntu-20.04", "macos-latest"]
2828
2929 runs-on : " ${{ matrix.os }}"
@@ -45,22 +45,21 @@ jobs:
4545 - name : " Install rust for arm64"
4646 if : startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')
4747 run : |
48+ rustup target add x86_64-apple-darwin
4849 rustup target add aarch64-apple-darwin
49- # - uses: Swatinem/rust-cache@v1
50- # with:
51- # key: "${{ matrix.os }}-${{ matrix.python-version }}"
50+ - name : " Install gfortran"
51+ if : startsWith(matrix.os, 'mac')
52+ run : |
53+ brew install gcc
54+ gfortran --version || sudo ln -s `which gfortran-12` /usr/local/bin/gfortran
55+ - uses : Swatinem/rust-cache@v1
56+ with :
57+ key : " ${{ matrix.os }}-${{ matrix.python-version }}"
5258 - name : " Install gfortran"
5359 if : contains(matrix.os, 'ubuntu')
5460 run : |
5561 sudo apt-get update
56- sudo apt-get install -y gfortran
57- - name : Install gfortran 2
58- if : contains(matrix.os, 'macos')
59- run : |
60- set -euo pipefail
61- brew install gcc@9 || true
62- gfortran --version || sudo ln -s /usr/local/bin/gfortran-9 /usr/local/bin/gfortran
63- gfortran --version
62+ sudo apt-get install -y gfortran ninja-build lld
6463 - name : " Install dependencies and code"
6564 run : |
6665 set -euo pipefail
@@ -76,35 +75,35 @@ jobs:
7675 make test
7776 - name : " Build macOS wheels"
7877 if : startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')
79- uses : pypa/cibuildwheel@v2.12.0
78+ uses : pypa/cibuildwheel@v2.21.3
8079 env :
81- MACOSX_DEPLOYMENT_TARGET : " 10.15 "
80+ MACOSX_DEPLOYMENT_TARGET : " 11 "
8281 CIBW_ARCHS_MACOS : " x86_64 arm64"
83- CIBW_SKIP : " cp37-macosx_arm64 cp36* pp*"
82+ CIBW_SKIP : " cp37-macosx_arm64 cp36* cp37* cp38* cp39* cp313* pp*"
8483 CIBW_BEFORE_BUILD : " touch filpreload/src/_filpreload.c" # force rebuild of Python code with new interpreter
8584 CIBW_TEST_COMMAND : python -m filprofiler run {project}/benchmarks/pystone.py
8685 with :
8786 output-dir : dist
8887 - name : " Build manylinux wheels"
89- if : startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.8 ')
88+ if : startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.9 ')
9089 run : |
9190 set -euo pipefail
9291 . venv/bin/activate
9392 make manylinux-wheel
9493 # Test wheel
9594 deactivate
96- python3.8 -m venv venv2
95+ python3.9 -m venv venv2
9796 . venv2/bin/activate
9897 pip install -r requirements-dev.txt
99- pip install dist/*-cp38 -*manylinux*.whl
98+ pip install dist/*-cp39 -*manylinux*.whl
10099 mv filprofiler filprofiler.disabled
101100 make test-python-no-deps
102101 - uses : actions/upload-artifact@v3
103102 with :
104103 name : " ${{ matrix.os }}-${{ matrix.python-version }}-wheel"
105104 path : dist/*.whl
106105 # - name: Publish distribution 📦 to Test PyPI
107- # if: (startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.8 ')) || startsWith(matrix.os, 'mac')
106+ # if: (startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.9 ')) || startsWith(matrix.os, 'mac')
108107 # env:
109108 # TWINE_USERNAME: __token__
110109 # TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
@@ -114,7 +113,7 @@ jobs:
114113 # twine check dist/*.whl
115114 # twine upload --repository testpypi dist/*.whl
116115 - name : Publish distribution 📦 to PyPI
117- if : startsWith(github.event.ref, 'refs/tags') && ((startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.8 ')) || (startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')))
116+ if : startsWith(github.event.ref, 'refs/tags') && ((startsWith(matrix.os, 'ubuntu') && (matrix.python-version == '3.9 ')) || (startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')))
118117 env :
119118 TWINE_USERNAME : __token__
120119 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
@@ -147,10 +146,10 @@ jobs:
147146 if : startsWith(github.event.ref, 'refs/tags')
148147 env :
149148 CIBW_ARCHS_LINUX : aarch64
150- CIBW_BEFORE_ALL_LINUX : " curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
149+ CIBW_BEFORE_ALL_LINUX : " yum install -y lld; curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
151150 CIBW_BEFORE_BUILD : " touch filpreload/src/_filpreload.c" # force rebuild of Python code with new interpreter
152151 CIBW_ENVIRONMENT : ' PATH="$PATH:$HOME/.cargo/bin"'
153- CIBW_SKIP : " cp27-* cp34-* cp35-* cp36-* cp311 -* pp* *-musllinux*"
152+ CIBW_SKIP : " cp27-* cp34-* cp35-* cp36-* cp37-* cp38-* cp313 -* pp* *-musllinux*"
154153 CIBW_TEST_COMMAND : python -m filprofiler run {project}/benchmarks/pystone.py
155154 steps :
156155 - uses : actions/checkout@v3
@@ -163,7 +162,7 @@ jobs:
163162 with :
164163 platforms : arm64
165164 - name : Build wheels
166- uses : pypa/cibuildwheel@v2.12.0
165+ uses : pypa/cibuildwheel@v2.21.3
167166 with :
168167 output-dir : dist
169168 - uses : actions/upload-artifact@v3
0 commit comments