@@ -48,57 +48,42 @@ jobs:
4848 strategy :
4949 fail-fast : false
5050 matrix :
51+ os : ['macos-latest', 'ubuntu-latest']
52+ abi3 : [true, false]
53+ ceres : [false, 'source', 'system']
54+ fftw : ['source', 'system', 'mkl']
55+ gsl : [true, false]
56+ exclude :
57+ # We don't support MKL on macOS
58+ - os : ' macos-latest'
59+ fftw : ' mkl'
60+ # Matrix is huge, let's make it more sparse
61+ - ceres : ' system'
62+ fftw : ' source'
63+ - ceres : ' source'
64+ fftw : ' system'
65+ - ceres : ' source'
66+ fftw : ' source'
67+ gsl : false
68+ - abi3 : true
69+ ceres : ' system'
70+ - abi3 : false
71+ fftw : ' system'
72+ - os : ' macos-latest'
73+ ceres : ' system'
74+ gsl : true
75+ # We have very limited support for Windows, fftw-source is the only supported feature
5176 include :
52- - name : ' Linux, default features'
53- os : ' ubuntu-latest'
54- maturin_build_args : ' --locked'
55- install_ceres : false
56- install_fftw : false
57- - name : ' macOS, default features'
58- os : ' macos-11'
59- maturin_build_args : ' --locked'
60- install_ceres : false
61- install_fftw : false
62- - name : ' Linux, system FFTW, source Ceres'
63- os : ' ubuntu-latest'
64- maturin_build_args : ' --locked --no-default-features --features ceres-source,fftw-system'
65- install_ceres : false
66- install_fftw : true
67- - name : ' macOS, system FFTW, source Ceres'
68- os : ' macos-11'
69- maturin_build_args : ' --locked --no-default-features --features ceres-source,fftw-system'
70- install_ceres : false
71- install_fftw : true
72- - name : ' Linux, system FFTW, system Ceres'
73- os : ' ubuntu-latest'
74- maturin_build_args : ' --locked --no-default-features --features ceres-system,fftw-system'
75- install_ceres : true
76- install_fftw : true
77- - name : ' macOS, system FFTW, system Ceres'
78- os : ' macos-11'
79- maturin_build_args : ' --locked --no-default-features --features ceres-system,fftw-system'
80- install_ceres : true
81- install_fftw : true
82- - name : ' Linux, system FFTW + GSL'
83- os : ' ubuntu-latest'
84- maturin_build_args : ' --locked --no-default-features --features fftw-system,gsl'
85- install_ceres : false
86- install_fftw : true
87- - name : ' macOS, system FFTW + GSL'
88- os : ' macos-11'
89- maturin_build_args : ' --locked --no-default-features --features fftw-system,gsl'
90- install_ceres : false
91- install_fftw : true
92- - name : ' Linux, MKL + GSL'
93- os : ' ubuntu-latest'
94- maturin_build_args : ' --locked --no-default-features --features fftw-mkl,gsl'
95- install_ceres : false
96- install_fftw : false
97- - name : ' Windows, statically linked FFTW for fftw-src'
98- os : ' windows-latest'
99- maturin_build_args : ' --locked --no-default-features --features fftw-source'
100- install_ceres : false
101- install_fftw : false
77+ - os : ' windows-latest'
78+ abi3 : false
79+ ceres : false
80+ fftw : ' source'
81+ gsl : false
82+ - os : ' windows-latest'
83+ abi3 : true
84+ ceres : false
85+ fftw : ' source'
86+ gsl : false
10287
10388 defaults :
10489 run :
@@ -110,52 +95,72 @@ jobs:
11095
11196 steps :
11297 - uses : actions/checkout@v3
113- - name : GSL, macOS
114- if : ${{ startsWith( matrix.os, 'macos' ) }}
115- run : brew install gsl
116- - name : Install CERES, Linux
117- if : ${{ matrix.install_ceres && startsWith( matrix.os, 'ubuntu' ) }}
118- run : |
119- sudo apt-get update
120- sudo apt-get install -y libunwind-dev
121- sudo apt-get install -y libceres-dev
122- - name : Install FFTW, macOS
123- if : ${{ matrix.install_ceres && startsWith( matrix.os, 'macos' ) }}
98+ - name : Install ceres on macOS
99+ if : ${{ matrix.ceres == 'system' && startsWith( matrix.os, 'macos' ) }}
124100 run : brew install ceres-solver
125- - name : Install FFTW, Linux
126- if : ${{ matrix.install_fftw && startsWith( matrix.os, 'ubuntu' ) }}
101+ - name : Install ceres on Linux
102+ if : ${{ matrix.ceres == 'system' && startsWith( matrix.os, 'ubuntu' ) }}
127103 run : |
128- sudo apt-get update
129- sudo apt-get install -y libfftw3-dev
130- - name : Install FFTW, macOS
131- if : ${{ matrix.install_fftw && startsWith( matrix.os, 'macos' ) }}
104+ sudo apt-get update
105+ sudo apt-get install -y libunwind-dev
106+ sudo apt-get install -y libceres-dev
107+ - name : Install FFTW on macOS
108+ if : ${{ matrix.fftw == 'system' && startsWith( matrix.os, 'macos' ) }}
132109 run : brew install fftw
110+ - name : Install FFTW on Linux
111+ if : ${{ matrix.fftw == 'system' && startsWith( matrix.os, 'ubuntu' ) }}
112+ run : |
113+ sudo apt-get update
114+ sudo apt-get install -y libfftw3-dev
115+ - name : Install GSL on macOS
116+ if : ${{ matrix.gsl && startsWith( matrix.os, 'macos' ) }}
117+ run : brew install gsl
118+ - name : Install GSL on Linux
119+ if : ${{ matrix.gsl && startsWith( matrix.os, 'ubuntu' ) }}
120+ run : |
121+ sudo apt-get update
122+ sudo apt-get install -y libgsl-dev
133123 - name : Set up Python 3.7
124+ if : ${{ ! matrix.abi3 }}
134125 uses : actions/setup-python@v4
135126 with :
136127 python-version : ' 3.7'
137128 - name : Set up Python 3.8
129+ if : ${{ ! matrix.abi3 }}
138130 uses : actions/setup-python@v4
139131 with :
140132 python-version : ' 3.8'
141133 - name : Set up Python 3.9
134+ if : ${{ ! matrix.abi3 }}
142135 uses : actions/setup-python@v4
143136 with :
144137 python-version : ' 3.9'
145138 - name : Set up Python 3.10
139+ # No if here, we want to build abi3 wheels on 3.10
146140 uses : actions/setup-python@v4
147141 with :
148142 python-version : ' 3.10'
149143 - name : Set up Python 3.11
144+ if : ${{ ! matrix.abi3 }}
150145 uses : actions/setup-python@v4
151146 with :
152147 python-version : ' 3.11'
153148 - name : Set up Rust toolchain
154149 uses : dtolnay/rust-toolchain@stable
155150 - name : Install maturin
156- run : pip install 'maturin>=0.14,<0.15'
157- - name : Build for ${{ matrix.name }}
158- run : maturin build --find-interpreter --manylinux=off ${{ matrix.maturin_build_args }}
151+ run : python3 -mpip install 'maturin>=0.14,<0.15'
152+ - name : Build wheels for abi3=${{ matrix.abi3 }} fftw=${{ matrix.fftw }} ceres=${{ matrix.ceres }} gsl=${{ matrix.gsl }}
153+ run : |
154+ maturin build --find-interpreter --manylinux=off --locked --no-default-features --features=fftw-${{ matrix.fftw }}${{ matrix.ceres == 'source' && ',ceres-source' || '' }}${{ matrix.ceres == 'system' && ',ceres-system' || '' }}${{ matrix.gsl && ',gsl' || '' }}${{ matrix.abi3 && ',abi3' || '' }}
155+ - name : Install abi3audit
156+ if : ${{ matrix.abi3 }}
157+ run : python3 -mpip install abi3audit
158+ - name : Check wheels for ABI compatibility on Linux
159+ if : ${{ matrix.abi3 && startsWith( matrix.os, 'ubuntu' ) }}
160+ run : abi3audit --strict target/wheels/*.whl
161+ - name : Check wheels for ABI compatibility on Windows
162+ if : ${{ matrix.abi3 && startsWith( matrix.os, 'windows' ) }}
163+ run : Get-ChildItem -Path .\target\wheels -Filter *.whl | ForEach-Object { abi3audit --strict $_.FullName }
159164
160165 coverage :
161166 runs-on : ubuntu-latest
0 commit comments