Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install cmake with pip #608

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 22 additions & 24 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@ jobs:
run: |
sudo apt-get update --fix-missing

- name: Workaround - install CMake 3.25.2 since 3.26.0 doesn't work
run: |
sudo apt remove cmake
sudo apt purge --auto-remove cmake
wget http://www.cmake.org/files/v3.25/cmake-3.25.2.tar.gz
tar xf cmake-3.25.2.tar.gz
cd cmake-3.25.2
./configure
make
sudo make install
hash -r
cd -

- name: Show CMake version
run: |
cmake --version

- name: Install dependencies
run: |
sudo apt-get install \
Expand All @@ -45,15 +28,25 @@ jobs:

- name: Install Python dependencies
run: |
pip install --upgrade pip -r requirements.txt
pip install -r requirements_dev.txt
pip install -r requirements_doc.txt
python3 -m pip install --upgrade pip -r requirements.txt
python3 -m pip install -r requirements_dev.txt
python3 -m pip install -r requirements_doc.txt

- name: check numpy
run: |
which python3
python3 --version
pip3 --version
python3 -m pip --version
python3 -c 'import numpy as np; print(np.get_include())'

- name: Workaround - install CMake 3.25.2 since 3.26.0 doesn't work
# Normally we would install cmake with the package manager, but
# ubuntu 20.04 doesn't seems to keep older versions of cmake around...
# Fortunately, there exists a pip package
run: |
python3 -m pip install cmake==3.25.2
cmake --version

- name: configure
run: |
mkdir build
Expand All @@ -62,27 +55,32 @@ jobs:
CFLAGS='-Wno-missing-field-initializers' \
cmake .. -DFORCE_EXAMPLES=ON -DWITH_FORTRAN=YES
cd -

- name: make
run: |
cd build
make
cmake --build .
cd -

- name: install
run: |
cd build
make install
cmake --install .
cd -

- name: make test
run: |
cd build
ctest || ctest --rerun-failed --output-on-failure -V
cd -

- name: build Linux wheel
run: |
cd python
pip install numpy wheel
python3 -m pip install numpy wheel
python3 setup.py bdist_wheel
cd -

- name: Install python package via setup.py and test the installation
run: |
cd python
Expand Down