Develop #1334
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-simple-CI | |
on: | |
pull_request: | |
types: | |
- ready_for_review | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
test-libE: | |
if: '! github.event.pull_request.draft' | |
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.8.2"] | |
comms-type: [m, l] | |
include: | |
- os: macos-latest | |
python-version: "3.11" | |
mpi-version: mpich | |
pydantic-version: "2.8.2" | |
comms-type: m | |
- os: macos-latest | |
python-version: "3.11" | |
mpi-version: mpich | |
pydantic-version: "2.8.2" | |
comms-type: l | |
- os: ubuntu-latest | |
mpi-version: mpich | |
python-version: "3.10" | |
pydantic-version: "1.10.17" | |
comms-type: m | |
- os: ubuntu-latest | |
mpi-version: mpich | |
python-version: "3.10" | |
pydantic-version: "1.10.17" | |
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 | |
- name: Force-update certifi and pip | |
run: | | |
python --version | |
python -m pip install --upgrade pip | |
python -m pip install -I --upgrade certifi | |
- name: Install Ubuntu compilers | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
conda install gcc_linux-64 | |
pip install nlopt==2.9.0 | |
# Roundabout solution on macos for proper linking with mpicc | |
- name: Install macOS compilers | |
if: matrix.os == 'macos-latest' | |
run: | | |
conda install clang_osx-64 | |
pip install nlopt==2.8.0 | |
- name: Install basic testing/feature dependencies | |
run: | | |
pip install -r install/testing_requirements.txt | |
pip install -r install/misc_feature_requirements.txt | |
source install/install_ibcdfo.sh | |
conda install numpy scipy | |
- name: Install mpi4py and MPI from conda | |
run: | | |
conda install mpi4py ${{ matrix.mpi-version }} | |
- name: Install libEnsemble, test flake8 | |
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/functionality_tests/test_local_sine_tutorial*.py # matplotlib errors on 3.12 | |
- name: Run simple tests, Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
./libensemble/tests/run_tests.py -A "-W error" -${{ matrix.comms-type }} | |
- name: Run simple tests, macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
./libensemble/tests/run_tests.py -A "-W error" -${{ matrix.comms-type }} | |
- name: Merge coverage | |
run: | | |
mv libensemble/tests/.cov* . | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
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/typos@v1.28.2 |