Skip to content
Open
Show file tree
Hide file tree
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
181 changes: 108 additions & 73 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,95 +8,130 @@ on:
- reopened
- synchronize

concurrency:
group: basic-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
HYDRA_LAUNCHER: fork
MPIR_CVAR_CH4_NETMOD: ofi
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
test-libE:
static:
if: "! github.event.pull_request.draft"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
lfs: true
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.69.0
cache: true
frozen: true
environments: py312
- name: Run static analysis
run: pixi run -e py312 flake8 libensemble && pixi run -e py312 mypy

unit:
if: "! github.event.pull_request.draft"
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: ["py312", "py313", "py314"]
comms-type: [m, l]
include:
- os: macos-latest
python-version: "py312"
mpi-version: mpich
comms-type: m
- os: macos-latest
python-version: "py312"
mpi-version: mpich
comms-type: l

env:
HYDRA_LAUNCHER: "fork"
MPIR_CVAR_CH4_NETMOD: "ofi"
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

defaults:
run:
shell: bash -l {0}

environment: [py312, py313, py314]
steps:
- uses: actions/checkout@v7
with:
lfs: true

- name: Checkout lockfile
run: git lfs checkout

- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.69.0
cache: true
frozen: true
environments: ${{ matrix.python-version }}
activate-environment: ${{ matrix.python-version }}

- name: Install minq
run: |
pixi run -e ${{ matrix.python-version }} ./install/install_minq.sh

- name: Install libEnsemble, test flake8
run: |
pip install -e .
flake8 libensemble

- name: Install mypy
run: pip install mypy

- name: Run mypy (limited scope)
run: mypy

- name: Remove various tests on newer pythons
if: matrix.python-version == 'py312' || matrix.python-version == 'py313' || matrix.python-version == 'py314'
run: |
rm ./libensemble/tests/functionality_tests/test_local_sine_tutorial*.py # matplotlib errors on py312
environments: ${{ matrix.environment }}
- name: Run unit tests
run: pixi run -e ${{ matrix.environment }} ./libensemble/tests/run_tests.py -u --no-coverage --durations 20

- 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: |
pixi run -e ${{ matrix.python-version }} ./libensemble/tests/run_tests.py -A "-W error" -${{ matrix.comms-type }}

- name: Merge coverage
run: |
mv libensemble/tests/.cov* .
core:
if: "! github.event.pull_request.draft"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
comms: [m, l]
steps:
- uses: actions/checkout@v7
with:
lfs: true
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.69.0
cache: true
frozen: true
environments: py312
- name: Install MINQ
run: pixi run -e py312 ./install/install_minq.sh
- name: Run core tests
run: >-
pixi run -e py312 ./libensemble/tests/run_tests.py -r -${{ matrix.comms }}
-A "-W error" --no-coverage --fail-fast --durations 25
--timings-json timings-${{ matrix.comms }}.json
- name: Upload timings
if: always()
uses: actions/upload-artifact@v4
with:
name: core-${{ matrix.comms }}-timings
path: timings-${{ matrix.comms }}.json
if-no-files-found: ignore

macos-smoke:
if: "! github.event.pull_request.draft"
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
with:
lfs: true
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.69.0
cache: true
frozen: true
environments: py312
- name: Run local smoke tests
run: >-
pixi run -e py312 ./libensemble/tests/run_tests.py -r -l
--no-coverage --fail-fast --durations 20
--match test_1d_super_simple.py
--match test_persistent_uniform_sampling_async.py
--match test_executor_simple.py
- name: Run MPI smoke tests
run: >-
pixi run -e py312 ./libensemble/tests/run_tests.py -r -m
--no-coverage --fail-fast --durations 20
--match test_1d_super_simple.py
--match test_persistent_uniform_sampling_async.py

coverage:
if: "! github.event.pull_request.draft"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
lfs: true
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.69.0
cache: true
frozen: true
environments: py312
- name: Install MINQ
run: pixi run -e py312 ./install/install_minq.sh
- name: Run canonical coverage suite
run: pixi run -e py312 ./libensemble/tests/run_tests.py -l --coverage --fail-fast --durations 25
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
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@v7
- uses: crate-ci/typos@v1.50.1
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ class AxParameterWarning(Warning): # Ensure it's a real warning subclass
r"https://libensemble\.slack\.com(?:/.*)?$",
r"https://software\.intel\.com/.*",
r"https://stackoverflow\.com/.*",
r"https?://www\.mpich\.org/.*",
r"https://www\.sfu\.ca/~ssurjano/camel6\.html",
]

autodoc_pydantic_model_show_json = False
Expand Down
Loading