mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[CI] Add Homebrew-based post-merge test
Use Homebrew to install Python for a post-merge test. This represents the most likely path for people compiling on macOS using a Homebrew Python. I deliberately didn't add all the other Python version combinations from the old test because I don't think we should encourage that route. Fix PEP 668 errors Install numpy with brew for tests
This commit is contained in:
parent
4c19713864
commit
d49d6f522c
29
.github/workflows/post-merge-tests.yml
vendored
29
.github/workflows/post-merge-tests.yml
vendored
@ -179,3 +179,32 @@ jobs:
|
|||||||
- name: Test Cantera
|
- name: Test Cantera
|
||||||
run:
|
run:
|
||||||
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time
|
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time
|
||||||
|
|
||||||
|
macos-homebrew:
|
||||||
|
runs-on: macos-14
|
||||||
|
name: Install Latest Python with Homebrew
|
||||||
|
timeout-minutes: 90
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: Checkout the repository
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
# NumPy is installed here for the Python custom rate tests
|
||||||
|
- name: Install Brew dependencies
|
||||||
|
run: brew install --display-times boost libomp hdf5 python python-setuptools scons numpy
|
||||||
|
- name: Set Include folder
|
||||||
|
run: |
|
||||||
|
echo "BOOST_INC_DIR=$(brew --prefix)/include" >> $GITHUB_ENV
|
||||||
|
# This is necessary because of PEP 668 https://peps.python.org/pep-0668/
|
||||||
|
# PEP 668 prohibits installation to system Python packages via pip
|
||||||
|
- name: Create a virtualenv for dependencies
|
||||||
|
run: |
|
||||||
|
$(brew --prefix)/bin/python3.12 -m venv .venv
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
./.venv/bin/python -m pip install -U pip setuptools wheel build
|
||||||
|
./.venv/bin/python -m pip install ruamel.yaml numpy cython pandas pytest pytest-github-actions-annotate-failures pint graphviz
|
||||||
|
- name: Build Cantera
|
||||||
|
run: $(brew --prefix)/bin/scons build env_vars=all python_cmd="$(pwd)/.venv/bin/python" -j3 debug=n --debug=time boost_inc_dir=${BOOST_INC_DIR}
|
||||||
|
- name: Test Cantera
|
||||||
|
run: $(brew --prefix)/bin/scons test show_long_tests=yes verbose_tests=yes --debug=time
|
||||||
|
Loading…
Reference in New Issue
Block a user