23
23
name : " ${{ matrix.os }}: Python ${{ matrix.python-version }}"
24
24
strategy :
25
25
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 "]
27
27
os : ["ubuntu-20.04", "macos-latest"]
28
28
29
29
runs-on : " ${{ matrix.os }}"
@@ -45,22 +45,21 @@ jobs:
45
45
- name : " Install rust for arm64"
46
46
if : startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')
47
47
run : |
48
+ rustup target add x86_64-apple-darwin
48
49
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 }}"
52
58
- name : " Install gfortran"
53
59
if : contains(matrix.os, 'ubuntu')
54
60
run : |
55
61
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
64
63
- name : " Install dependencies and code"
65
64
run : |
66
65
set -euo pipefail
@@ -76,35 +75,35 @@ jobs:
76
75
make test
77
76
- name : " Build macOS wheels"
78
77
if : startsWith(matrix.os, 'mac') && (matrix.python-version == '3.9')
79
- uses : pypa/cibuildwheel@v2.12.0
78
+ uses : pypa/cibuildwheel@v2.21.3
80
79
env :
81
- MACOSX_DEPLOYMENT_TARGET : " 10.15 "
80
+ MACOSX_DEPLOYMENT_TARGET : " 11 "
82
81
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*"
84
83
CIBW_BEFORE_BUILD : " touch filpreload/src/_filpreload.c" # force rebuild of Python code with new interpreter
85
84
CIBW_TEST_COMMAND : python -m filprofiler run {project}/benchmarks/pystone.py
86
85
with :
87
86
output-dir : dist
88
87
- 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 ')
90
89
run : |
91
90
set -euo pipefail
92
91
. venv/bin/activate
93
92
make manylinux-wheel
94
93
# Test wheel
95
94
deactivate
96
- python3.8 -m venv venv2
95
+ python3.9 -m venv venv2
97
96
. venv2/bin/activate
98
97
pip install -r requirements-dev.txt
99
- pip install dist/*-cp38 -*manylinux*.whl
98
+ pip install dist/*-cp39 -*manylinux*.whl
100
99
mv filprofiler filprofiler.disabled
101
100
make test-python-no-deps
102
101
- uses : actions/upload-artifact@v3
103
102
with :
104
103
name : " ${{ matrix.os }}-${{ matrix.python-version }}-wheel"
105
104
path : dist/*.whl
106
105
# - 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')
108
107
# env:
109
108
# TWINE_USERNAME: __token__
110
109
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
@@ -114,7 +113,7 @@ jobs:
114
113
# twine check dist/*.whl
115
114
# twine upload --repository testpypi dist/*.whl
116
115
- 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')))
118
117
env :
119
118
TWINE_USERNAME : __token__
120
119
TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
@@ -147,10 +146,10 @@ jobs:
147
146
if : startsWith(github.event.ref, 'refs/tags')
148
147
env :
149
148
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"
151
150
CIBW_BEFORE_BUILD : " touch filpreload/src/_filpreload.c" # force rebuild of Python code with new interpreter
152
151
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*"
154
153
CIBW_TEST_COMMAND : python -m filprofiler run {project}/benchmarks/pystone.py
155
154
steps :
156
155
- uses : actions/checkout@v3
@@ -163,7 +162,7 @@ jobs:
163
162
with :
164
163
platforms : arm64
165
164
- name : Build wheels
166
- uses : pypa/cibuildwheel@v2.12.0
165
+ uses : pypa/cibuildwheel@v2.21.3
167
166
with :
168
167
output-dir : dist
169
168
- uses : actions/upload-artifact@v3
0 commit comments