libEnsemble-complete-CI #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: libEnsemble-complete-CI | |
on: | |
workflow_dispatch: | |
jobs: | |
test-libE: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
mpi-version: [mpich] | |
python-version: [3.9, "3.10", "3.11", "3.12"] | |
pydantic-version: ["2.6.4"] | |
comms-type: [m, l] | |
include: | |
- os: macos-latest | |
python-version: 3.11 | |
mpi-version: mpich | |
pydantic-version: "2.6.4" | |
comms-type: m | |
- os: macos-latest | |
python-version: 3.11 | |
mpi-version: mpich | |
pydantic-version: "2.6.4" | |
comms-type: l | |
- os: ubuntu-latest | |
python-version: "3.10" | |
mpi-version: mpich | |
pydantic-version: "2.6.4" | |
comms-type: t | |
- os: ubuntu-latest | |
mpi-version: "openmpi" | |
pydantic-version: "2.6.4" | |
python-version: "3.12" | |
comms-type: l | |
- os: ubuntu-latest | |
mpi-version: mpich | |
python-version: "3.10" | |
pydantic-version: "1.10.13" | |
comms-type: m | |
- os: ubuntu-latest | |
mpi-version: mpich | |
python-version: "3.10" | |
pydantic-version: "1.10.13" | |
comms-type: l | |
env: | |
HYDRA_LAUNCHER: "fork" | |
TERM: xterm-256color | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup conda - Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: condaenv | |
miniconda-version: "latest" | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
channel-priority: flexible | |
auto-update-conda: true | |
- uses: actions/cache/restore@v4 | |
name: Restore cached dependencies | |
id: cache | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
path: | | |
/home/runner/work/libensemble/libensemble/heffte/build/ | |
/home/runner/.local | |
/usr/share/miniconda3/envs/condaenv | |
/usr/share/miniconda3/bin | |
/usr/share/miniconda3/lib | |
/usr/share/miniconda3/include | |
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }}-${{ matrix.pydantic-version }}-extra | |
- name: Force-update certifi | |
run: | | |
python --version | |
pip install -I --upgrade certifi | |
- name: Install Ubuntu compilers | |
if: matrix.os == 'ubuntu-latest' | |
run: conda install gcc_linux-64 | |
# Roundabout solution on macos for proper linking with mpicc | |
- name: Install macOS compilers | |
if: matrix.os == 'macos-latest' | |
run: | | |
conda install clang_osx-64 | |
- name: Install mpi4py and MPI from conda | |
if: (matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest') || matrix.os == 'macos-latest' | |
run: | | |
conda install mpi4py ${{ matrix.mpi-version }} | |
- name: Install mpi4py from pip, MPI from conda | |
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' | |
run: | | |
conda install ${{ matrix.mpi-version }} | |
pip install mpi4py | |
- name: Install generator dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mpmath | |
pip install matplotlib | |
conda env update --file install/gen_deps_environment.yml | |
#- name: Install ax-platform | |
# run: pip install "ax-platform<=0.4.0" | |
- name: Install gpcam | |
if: matrix.python-version != '3.12' | |
run: | | |
pip install gpcam | |
- name: Install surmise | |
if: matrix.os != 'macos-latest' | |
run: | | |
pip install --upgrade git+https://github.com/bandframework/surmise.git | |
- name: Build ytopt and dependencies | |
if: matrix.python-version <= '3.10' && matrix.os != 'macos-latest' | |
run: | | |
pip install scikit-learn==1.4.0 | |
pip install pandas==2.2.1 | |
pip install ConfigSpace | |
pip install "ray[default]" | |
git clone https://github.com/ytopt-team/scikit-optimize.git | |
cd scikit-optimize | |
pip install . | |
cd .. | |
git clone -b version1 https://github.com/ytopt-team/autotune.git | |
cd autotune | |
pip install . | |
cd .. | |
git clone -b main https://github.com/ytopt-team/ytopt.git | |
cd ytopt | |
pip install . | |
cd .. | |
- name: Install generator dependencies for Ubuntu tests | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version != '3.12' | |
run: | | |
sudo apt-get install bc | |
# pip install dragonfly-opt | |
# pip install git+https://github.com/dragonfly/dragonfly.git | |
pip install git+https://github.com/jlnav/dragonfly.git@fix/remove_npobject | |
pip install scikit-build packaging Tasmanian --user | |
- name: Install other testing dependencies | |
run: | | |
conda install octave | |
conda install pyzmq | |
pip install -r install/testing_requirements.txt | |
pip install -r install/misc_feature_requirements.txt | |
git clone https://github.com/argonne-lcf/balsam.git | |
sed -i -e "s/pyzmq>=22.1.0,<23.0.0/pyzmq>=23.0.0,<24.0.0/" ./balsam/setup.cfg | |
cd balsam; pip install -e .; cd .. | |
git clone --recurse-submodules -b develop https://github.com/POptUS/IBCDFO.git | |
pushd IBCDFO/minq/py/minq5/ | |
export PYTHONPATH="$PYTHONPATH:$(pwd)" | |
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV | |
popd | |
pushd IBCDFO/ibcdfo_pypkg/ | |
pip install -e . | |
popd | |
- name: Build heffte | |
if: matrix.os != 'macos-latest' | |
run: | | |
# begin heffte build and dependencies | |
sudo apt install libfftw3-dev | |
git clone https://github.com/icl-utk-edu/heffte.git | |
mkdir heffte/build | |
cd heffte/build | |
pwd | |
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D CMAKE_INSTALL_PREFIX=./ -D Heffte_ENABLE_AVX=ON -D Heffte_ENABLE_FFTW=ON ../ | |
make -j 4 | |
make install | |
cp ./benchmarks/speed3d_c2c ../../libensemble/tests/regression_tests/ | |
# end heffte build and dependencies | |
- uses: actions/cache/save@v4 | |
name: Save dependencies to cache | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
path: | | |
/home/runner/work/libensemble/libensemble/heffte/build/ | |
/home/runner/.local | |
/usr/share/miniconda3/envs/condaenv | |
/usr/share/miniconda3/bin | |
/usr/share/miniconda3/lib | |
/usr/share/miniconda3/include | |
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }} | |
- name: Install libEnsemble, flake8, lock environment | |
run: | | |
pip install pydantic==${{ matrix.pydantic-version }} | |
pip install -e . | |
flake8 libensemble | |
- name: Remove various tests on newer pythons | |
if: matrix.python-version >= '3.11' | |
run: | | |
rm ./libensemble/tests/regression_tests/test_ytopt_heffte.py | |
# rm ./libensemble/tests/regression_tests/test_gpCAM.py | |
rm ./libensemble/tests/regression_tests/test_persistent_gp.py | |
- name: Remove test for persistent Tasmanian on Python 3.12 | |
if: matrix.python-version >= '3.12' | |
run: | | |
rm ./libensemble/tests/regression_tests/test_persistent_tasmanian.py | |
rm ./libensemble/tests/regression_tests/test_persistent_tasmanian_async.py | |
- name: Remove Balsam/Globus-compute tests on Pydantic 2 | |
if: matrix.pydantic-version == '2.6.4' | |
run: | | |
rm ./libensemble/tests/unit_tests/test_ufunc_runners.py | |
rm ./libensemble/tests/unit_tests/test_executor_balsam.py | |
- name: Run extensive tests, Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
./libensemble/tests/run-tests.sh -e -z -${{ matrix.comms-type }} | |
- name: Run extensive tests, macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
./libensemble/tests/run-tests.sh -e -z -${{ matrix.comms-type }} | |
- name: Merge coverage | |
run: | | |
mv libensemble/tests/.cov* . | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
spellcheck: | |
name: Spellcheck release branch | |
if: contains(github.base_ref, 'develop') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/[email protected] |