Skip to content

Commit 41a0ce1

Browse files
committed
update pip.yml for building wheels for PyPI
1 parent a610480 commit 41a0ce1

File tree

3 files changed

+63
-47
lines changed

3 files changed

+63
-47
lines changed

.github/workflows/cd.yml

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
runs-on: ${{ matrix.platform }}
6161

6262
steps:
63-
- name: checkout vcell-solvers repo
63+
- name: checkout vcell-fvsolvers repo
6464
uses: actions/checkout@v4
6565
with:
6666
submodules: true
@@ -104,6 +104,42 @@ jobs:
104104
brew info boost
105105
brew info hdf5
106106
107+
- name: Install Windows Dependencies
108+
if: matrix.platform == 'windows-latest'
109+
uses: msys2/setup-msys2@v2
110+
with:
111+
msystem: CLANG64
112+
update: true
113+
install: >
114+
zip
115+
git
116+
mingw-w64-clang-x86_64-curl
117+
mingw-w64-clang-x86_64-toolchain
118+
mingw-w64-clang-x86_64-flang
119+
mingw-w64-clang-x86_64-cmake
120+
mingw-w64-clang-x86_64-boost
121+
mingw-w64-clang-x86_64-hdf5
122+
mingw-w64-clang-x86_64-libzip
123+
mingw-w64-clang-x86_64-zlib
124+
mingw-w64-clang-x86_64-libaec
125+
126+
- name: Install Linux Dependencies
127+
if: matrix.platform == 'ubuntu-latest'
128+
run: |
129+
sudo apt-get update
130+
sudo apt-get install -y libboost-all-dev
131+
sudo apt-get install -y libhdf5-dev
132+
sudo apt-get install -y libzip-dev
133+
sudo apt-get install -y ninja-build
134+
135+
gcc --version
136+
gfortran --version
137+
cmake --version
138+
dpkg -s libboost-all-dev
139+
dpkg -s libhdf5-dev
140+
141+
142+
107143
- name: Build Macos ARM
108144
if: matrix.platform == 'macos-14'
109145
run: |
@@ -182,25 +218,6 @@ jobs:
182218
# limit-access-to-actor: false
183219

184220

185-
- name: Install Windows Dependencies
186-
if: matrix.platform == 'windows-latest'
187-
uses: msys2/setup-msys2@v2
188-
with:
189-
msystem: CLANG64
190-
update: true
191-
install: >
192-
zip
193-
git
194-
mingw-w64-clang-x86_64-curl
195-
mingw-w64-clang-x86_64-toolchain
196-
mingw-w64-clang-x86_64-flang
197-
mingw-w64-clang-x86_64-cmake
198-
mingw-w64-clang-x86_64-boost
199-
mingw-w64-clang-x86_64-hdf5
200-
mingw-w64-clang-x86_64-libzip
201-
mingw-w64-clang-x86_64-zlib
202-
mingw-w64-clang-x86_64-libaec
203-
204221
# - name: Setup tmate session
205222
# uses: mxschmitt/action-tmate@v3
206223
# with:
@@ -249,21 +266,6 @@ jobs:
249266
./bin/FiniteVolume_x64 || true
250267
echo
251268
252-
- name: Install Linux Dependencies
253-
if: matrix.platform == 'ubuntu-latest'
254-
run: |
255-
sudo apt-get update
256-
sudo apt-get install -y libboost-all-dev
257-
sudo apt-get install -y libhdf5-dev
258-
sudo apt-get install -y libzip-dev
259-
sudo apt-get install -y ninja-build
260-
261-
gcc --version
262-
gfortran --version
263-
cmake --version
264-
dpkg -s libboost-all-dev
265-
dpkg -s libhdf5-dev
266-
267269
- name: Build Linux
268270
if: matrix.platform == 'ubuntu-latest'
269271
run: |

.github/workflows/pip.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,27 @@ jobs:
3737
run: |
3838
brew install boost
3939
brew install hdf5
40+
brew install libzip
4041
brew install ninja
4142
4243
brew install llvm
4344
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
4445
source /Users/runner/.bash_profile
46+
ln -s $(which gfortran-14) /usr/local/bin/gfortran
4547
4648
gcc --version
4749
gfortran --version
4850
cmake --version
4951
brew info boost
5052
brew info hdf5
5153
52-
5354
- name: Install ARM MacOS dependencies
5455
if: matrix.platform == 'macos-14'
5556
shell: bash
5657
run: |
5758
brew install boost
5859
brew install hdf5
60+
brew install libzip
5961
brew install ninja
6062
6163
brew install llvm
@@ -68,7 +70,6 @@ jobs:
6870
brew info boost
6971
brew info hdf5
7072
71-
7273
- name: Install Windows Dependencies
7374
if: matrix.platform == 'windows-latest'
7475
uses: msys2/setup-msys2@v2
@@ -93,28 +94,31 @@ jobs:
9394
with:
9495
python-version: "${{ matrix.python-version }}"
9596

96-
- name: Build and install macos-13
97+
98+
- name: Build and install macos-14
99+
if: matrix.platform == 'macos-14'
97100
run: |
98-
export MACOSX_DEPLOYMENT_TARGET=13.0
99-
PATH="/usr/local/opt/llvm/bin:$PATH"
101+
PATH="/opt/homebrew/opt/llvm/bin:$PATH"
100102
pip wheel . -w dist
101103
ls -al dist
102104
pip install delocate
103105
delocate-listdeps dist/*.whl
104106
delocate-wheel -v dist/*.whl
105107
pip install dist/*.whl
106-
if: matrix.platform == 'macos-13'
107108
108-
- name: Build and install macos-14
109+
110+
- name: Build and install macos-13
111+
if: matrix.platform == 'macos-13'
109112
run: |
110-
PATH="/opt/homebrew/opt/llvm/bin:$PATH"
113+
export MACOSX_DEPLOYMENT_TARGET=13.0
114+
PATH="/usr/local/opt/llvm/bin:$PATH"
111115
pip wheel . -w dist
112116
ls -al dist
113117
pip install delocate
114118
delocate-listdeps dist/*.whl
115119
delocate-wheel -v dist/*.whl
116120
pip install dist/*.whl
117-
if: matrix.platform == 'macos-14'
121+
118122
119123
- name: Build and install windows-latest
120124
shell: msys2 {0}

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
FROM ubuntu:22.04
22

3-
RUN apt-get -y update && apt-get install -y apt-utils && \
4-
apt-get install -y -qq -o=Dpkg::Use-Pty=0 build-essential gfortran \
5-
libhdf5-dev libzip-dev ninja-build libcurl4-openssl-dev libboost-all-dev libbz2-dev cmake python3
3+
RUN apt-get -y update && \
4+
apt-get install -y apt-utils && \
5+
apt-get install -y -qq -o=Dpkg::Use-Pty=0 \
6+
build-essential \
7+
cmake \
8+
ninja-build \
9+
gfortran \
10+
libcurl4-openssl-dev \
11+
libhdf5-dev \
12+
libzip-dev \
13+
libboost-all-dev \
14+
libbz2-dev \
15+
python3
616

717
# Install an alternative Fortran compiler
818
RUN apt-get install -y gfortran-10

0 commit comments

Comments
 (0)