Skip to content

Commit 19dbb3c

Browse files
committed
add scikit-build-core based build for windows
1 parent ed0fe90 commit 19dbb3c

File tree

8 files changed

+57
-584
lines changed

8 files changed

+57
-584
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
python-version: ["3.9", "3.13"]
37-
runs-on: [ubuntu-latest, ubuntu-24.04-arm, macos-latest] # , windows-latest]
37+
runs-on: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] # , windows-11-arm]
3838
arch: [auto64]
39+
exclude:
40+
- runs-on: windows-11-arm
41+
python-version: "3.9"
42+
3943
steps:
4044
- uses: actions/checkout@v4
4145
with:
@@ -46,27 +50,24 @@ jobs:
4650
with:
4751
python-version: ${{ matrix.python-version }}
4852

49-
- name: Install compiler tools on windows
53+
- name: Install extra deps on windows
5054
if: runner.os == 'windows'
5155
run: |
52-
Install-Module -Name 7Zip4Powershell -Force
5356
Invoke-Webrequest -Uri https://archives.boost.io/release/1.88.0/source/boost_1_88_0.zip -OutFile boost_1_88_0.zip
5457
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1.zip -OutFile CGAL-6.0.1.zip
55-
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-win64-auxiliary-libraries-gmp-mpfr.zip -OutFile cgal_auxlibs.zip
56-
Expand-7Zip boost_1_88_0.zip .\boost_1_88_0
57-
Expand-7Zip CGAL-6.0.1.zip .\CGAL-6.0.1
58-
Expand-7Zip cgal_auxlibs.zip .\cgal_auxlibs
59-
vcpkg.exe install getopt
58+
Expand-Archive boost_1_88_0.zip .\boost_1_88_0
59+
Expand-Archive CGAL-6.0.1.zip .\CGAL-6.0.1
6060
61-
- name: Install compiler tools on macOS
61+
- name: Install extra deps on macOS
6262
if: runner.os == 'macOS'
6363
run: |
64-
brew reinstall gfortran
65-
brew install swig boost cgal gmp mpfr
64+
brew install --ignore-dependencies swig boost cgal
6665
6766
- name: Install extra deps on Linux
6867
if: runner.os == 'Linux'
69-
run: sudo apt-get update && sudo apt-get install -y libboost-dev libmpfr-dev swig libcgal-dev
68+
run: |
69+
sudo apt-get update
70+
sudo apt-get install -y libboost-dev swig libcgal-dev
7071
7172
- name: Install package (macOS)
7273
if: runner.os == 'macOS'
@@ -85,12 +86,7 @@ jobs:
8586
if: runner.os == 'windows'
8687
run: |
8788
$Env:Path
88-
$Env:GMP_INC_DIR = "${PWD}\cgal_auxlibs\auxiliary\gmp\include"
89-
$Env:GMP_LIB_DIR = "${PWD}\cgal_auxlibs\auxiliary\gmp\lib"
90-
$Env:MPFR_INC_DIR = "${PWD}\cgal_auxlibs\auxiliary\gmp\include"
91-
$Env:MPFR_LIB_DIR = "${PWD}\cgal_auxlibs\auxiliary\gmp\lib"
92-
$Env:CMAKE_PREFIX_PATH = "C:\vcpkg\packages\getopt-win32_x64-windows\share\unofficial-getopt-win32;$Env:CMAKE_PREFIX_PATH"
93-
python -m pip install '.[test]' -v -C"cmake.define.GMP_DLL_TO_COPY"="C:\\a\\fastjet\\fastjet\\cgal_auxlibs\\auxiliary\\gmp\\bin\\gmp-10.dll" -C"cmake.define.Boost_INCLUDE_DIR"="${PWD}\boost_1_88_0\boost_1_88_0" -C"cmake.define.CGAL_DIR"="${PWD}\CGAL-6.0.1\CGAL-6.0.1" -C"cmake.define.FASTJET_ENABLE_DEBUG"="OFF" -C"cmake.define.SISCONE_ENABLE_DEBUG"="OFF" -C"cmake.define.FASTJET_ENABLE_CGAL"="ON"
89+
python -m pip install '.[test]' -v -C"cmake.define.Boost_INCLUDE_DIR"="${{ github.workspace }}\boost_1_88_0\boost_1_88_0" -C"cmake.define.CGAL_DIR"="${{ github.workspace }}\CGAL-6.0.1\CGAL-6.0.1" -C"cmake.define.FASTJET_ENABLE_CGAL"="ON"
9490
9591
- name: List installed Python packages
9692
run: python -m pip list
@@ -104,7 +100,7 @@ jobs:
104100
strategy:
105101
fail-fast: false
106102
matrix:
107-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13] # , windows-latest]
103+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13, windows-latest] # , windows-11-arm]
108104
python: [313]
109105
arch: [auto64]
110106

@@ -114,68 +110,24 @@ jobs:
114110
submodules: recursive
115111
fetch-depth: 0
116112

117-
- name: Install compiler tools on macOS
113+
- name: Install extra deps on macOS
118114
if: runner.os == 'macOS'
119115
run: |
120116
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV"
121-
brew uninstall --force --ignore-dependencies gcc@12 gcc@13 gnupg gnutls isl libmpc nettle gcc mpfr gmp
122-
brew install --ignore-dependencies m4 make automake autoconf libtool swig boost cgal
117+
brew install --ignore-dependencies swig boost cgal
123118
echo "PATH=/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" >> "$GITHUB_ENV"
124119
125-
- name: Install compiler tools on windows
120+
- name: Install extra deps on windows
126121
if: runner.os == 'windows'
127122
run: |
128-
Install-Module -Name 7Zip4Powershell -Force
129123
Invoke-Webrequest -Uri https://archives.boost.io/release/1.88.0/source/boost_1_88_0.zip -OutFile boost_1_88_0.zip
130124
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1.zip -OutFile CGAL-6.0.1.zip
131-
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-win64-auxiliary-libraries-gmp-mpfr.zip -OutFile cgal_auxlibs.zip
132-
Expand-7Zip boost_1_88_0.zip .\boost_1_88_0
133-
Expand-7Zip CGAL-6.0.1.zip .\CGAL-6.0.1
134-
Expand-7Zip cgal_auxlibs.zip .\cgal_auxlibs
135-
vcpkg.exe install getopt
125+
Expand-Archive -Path boost_1_88_0.zip -DestinationPath .\boost_1_88_0
126+
Expand-Archive -Path CGAL-6.0.1.zip -DestinationPath .\CGAL-6.0.1
136127
137128
- name: Install extra deps on Linux
138129
if: runner.os == 'Linux'
139-
run: sudo apt-get update && sudo apt-get install -y libboost-dev libmpfr-dev swig libcgal-dev
140-
141-
- name: Clone gmp
142-
if: runner.os == 'macOS'
143-
uses: actions/checkout@v4
144-
with:
145-
repository: gmp-mirror/gmp-6.3
146-
path: gmp-6.3
147-
148-
- name: Build gmp from source for MACOSX_DEPLOYMENT_TARGET=11.0
149-
if: runner.os == 'macOS'
150-
working-directory: gmp-6.3
151-
run: |
152-
brew install texinfo
153-
autoreconf -i -f
154-
./configure --help
155-
./configure \
156-
--prefix=$(brew --prefix) \
157-
--enable-cxx
158-
touch ./doc/version.texi
159-
make --jobs
160-
make install
161-
162-
- name: Get mpfr release
163-
if: runner.os == 'macOS'
164-
run: |
165-
curl -Lk https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.gz -o mpfr-4.2.2.tar.gz
166-
tar -xzf mpfr-4.2.2.tar.gz
167-
168-
- name: Build mpfr from source for MACOSX_DEPLOYMENT_TARGET=11.0
169-
if: runner.os == 'macOS'
170-
working-directory: mpfr-4.2.2
171-
run: |
172-
autoreconf -i -f
173-
./configure --help
174-
./configure \
175-
--prefix=$(brew --prefix) \
176-
--with-gmp=$(brew --prefix)
177-
make --jobs
178-
make install
130+
run: sudo apt-get update && sudo apt-get install -y libboost-dev swig libcgal-dev
179131

180132
- uses: pypa/[email protected]
181133
env:
@@ -185,15 +137,9 @@ jobs:
185137
CIBW_CONFIG_SETTINGS: >
186138
"cmake.define.FASTJET_ENABLE_CGAL"="ON"
187139
CIBW_CONFIG_SETTINGS_WINDOWS: >
188-
"cmake.define.GMP_DLL_TO_COPY"="C:\\\\a\\\\fastjet\\\\fastjet\\\\cgal_auxlibs\\\\auxiliary\\\\gmp\\\\bin\\\\gmp-10.dll"
189-
"cmake.define.Boost_INCLUDE_DIR"="C:\a\fastjet\fastjet\boost_1_88_0\boost_1_88_0"
190-
"cmake.define.CGAL_DIR"="C:\a\fastjet\fastjet\CGAL-6.0.1\CGAL-6.0.1"
191-
"cmake.define.unofficial-getopt-win32_DIR"="C:\vcpkg\packages\getopt-win32_x64-windows\share\unofficial-getopt-win32"
192-
CIBW_ENVIRONMENT_WINDOWS: >
193-
GMP_INC_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\include'
194-
GMP_LIB_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\lib'
195-
MPFR_INC_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\include'
196-
MPFR_LIB_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\lib'
140+
"cmake.define.Boost_INCLUDE_DIR"="${{ github.workspace }}\boost_1_88_0\boost_1_88_0"
141+
"cmake.define.CGAL_DIR"="${{ github.workspace }}\CGAL-6.0.1\CGAL-6.0.1"
142+
"cmake.define.FASTJET_ENABLE_CGAL"="ON"
197143
198144
- name: Upload wheels
199145
uses: actions/upload-artifact@v4

.github/workflows/wheels.yml

Lines changed: 15 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -34,74 +34,34 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
python: [39, 310, 311, 312, 313]
37-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13] # , windows-latest]
37+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13, windows-latest] # , windows-11-arm]
3838
arch: [auto64]
39+
exclude:
40+
- os: windows-11-arm
41+
python: 39
42+
- os: windows-11-arm
43+
python: 310
3944

4045
steps:
4146
- uses: actions/checkout@v4
4247
with:
4348
submodules: recursive
4449
fetch-depth: 0
4550

46-
- name: Install compiler tools on macOS
51+
- name: Install extra deps on macOS
4752
if: runner.os == 'macOS'
4853
run: |
4954
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV"
50-
brew uninstall --force --ignore-dependencies gcc@12 gcc@13 gnupg gnutls isl libmpc nettle gcc mpfr gmp
51-
brew install --ignore-dependencies m4 make automake autoconf libtool swig boost cgal
55+
brew install --ignore-dependencies swig boost cgal
5256
echo "PATH=/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" >> "$GITHUB_ENV"
5357
54-
- name: Install compiler tools on windows
58+
- name: Install extra deps on windows
5559
if: runner.os == 'windows'
5660
run: |
57-
Install-Module -Name 7Zip4Powershell -Force
5861
Invoke-Webrequest -Uri https://archives.boost.io/release/1.88.0/source/boost_1_88_0.zip -OutFile boost_1_88_0.zip
5962
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1.zip -OutFile CGAL-6.0.1.zip
60-
Invoke-Webrequest -Uri https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-win64-auxiliary-libraries-gmp-mpfr.zip -OutFile cgal_auxlibs.zip
61-
Expand-7Zip boost_1_88_0.zip .\boost_1_88_0
62-
Expand-7Zip CGAL-6.0.1.zip .\CGAL-6.0.1
63-
Expand-7Zip cgal_auxlibs.zip .\cgal_auxlibs
64-
vcpkg.exe install getopt
65-
66-
- name: Clone gmp
67-
if: runner.os == 'macOS'
68-
uses: actions/checkout@v4
69-
with:
70-
repository: gmp-mirror/gmp-6.3
71-
path: gmp-6.3
72-
73-
- name: Build gmp from source for MACOSX_DEPLOYMENT_TARGET
74-
if: runner.os == 'macOS'
75-
working-directory: gmp-6.3
76-
run: |
77-
export PATH="/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
78-
brew install texinfo
79-
autoreconf -i -f
80-
./configure --help
81-
./configure \
82-
--prefix=$(brew --prefix) \
83-
--enable-cxx
84-
touch ./doc/version.texi
85-
make --jobs
86-
make install
87-
88-
- name: Get mpfr release
89-
if: runner.os == 'macOS'
90-
run: |
91-
curl -Lk https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.gz -o mpfr-4.2.2.tar.gz
92-
tar -xzf mpfr-4.2.2.tar.gz
93-
94-
- name: Build mpfr from source for MACOSX_DEPLOYMENT_TARGET=11.0
95-
if: runner.os == 'macOS'
96-
working-directory: mpfr-4.2.2
97-
run: |
98-
autoreconf -i -f
99-
./configure --help
100-
./configure \
101-
--prefix=$(brew --prefix) \
102-
--with-gmp=$(brew --prefix)
103-
make --jobs
104-
make install
63+
Expand-Archive boost_1_88_0.zip .\boost_1_88_0
64+
Expand-Archive CGAL-6.0.1.zip .\CGAL-6.0.1
10565
10666
- uses: pypa/[email protected]
10767
env:
@@ -110,15 +70,9 @@ jobs:
11070
CIBW_CONFIG_SETTINGS: >
11171
"cmake.define.FASTJET_ENABLE_CGAL"="ON"
11272
CIBW_CONFIG_SETTINGS_WINDOWS: >
113-
"cmake.define.GMP_DLL_TO_COPY"="C:\\\\a\\\\fastjet\\\\fastjet\\\\cgal_auxlibs\\\\auxiliary\\\\gmp\\\\bin\\\\gmp-10.dll"
114-
"cmake.define.Boost_INCLUDE_DIR"="C:\a\fastjet\fastjet\boost_1_88_0\boost_1_88_0"
115-
"cmake.define.CGAL_DIR"="C:\a\fastjet\fastjet\CGAL-6.0.1\CGAL-6.0.1"
116-
"cmake.define.unofficial-getopt-win32_DIR"="C:\vcpkg\packages\getopt-win32_x64-windows\share\unofficial-getopt-win32"
117-
CIBW_ENVIRONMENT_WINDOWS: >
118-
GMP_INC_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\include'
119-
GMP_LIB_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\lib'
120-
MPFR_INC_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\include'
121-
MPFR_LIB_DIR='C:\a\fastjet\fastjet\cgal_auxlibs\auxiliary\gmp\lib'
73+
"cmake.define.Boost_INCLUDE_DIR"="${{ github.workspace }}\boost_1_88_0\boost_1_88_0"
74+
"cmake.define.CGAL_DIR"="${{ github.workspace }}\CGAL-6.0.1\CGAL-6.0.1"
75+
"cmake.define.FASTJET_ENABLE_CGAL"="ON"
12276
12377
- name: Upload wheels
12478
uses: actions/upload-artifact@v4
@@ -138,7 +92,7 @@ jobs:
13892

13993
- name: Install extra deps on Linux
14094
if: runner.os == 'Linux'
141-
run: sudo apt-get update && sudo apt-get install -y libboost-dev swig autoconf libtool libcgal-dev
95+
run: sudo apt-get update && sudo apt-get install -y libboost-dev swig libcgal-dev
14296

14397
- name: test sdist
14498
run: python -m pip install dist/*.tar.gz

0 commit comments

Comments
 (0)