From bf024b2894930441629e2fa602b435268d92ecd4 Mon Sep 17 00:00:00 2001 From: jlnav Date: Wed, 16 Sep 2026 10:20:49 -0500 Subject: [PATCH 1/2] Split pull request CI by responsibility --- .github/workflows/basic.yml | 207 +++++++++++++++++++++++------------- 1 file changed, 135 insertions(+), 72 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index b79fae37b..e31739402 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -8,95 +8,158 @@ 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: ${{ matrix.os }} + 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: 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 }} + environments: ${{ matrix.environment }} + - name: Run unit tests + run: pixi run -e ${{ matrix.environment }} ./libensemble/tests/run_tests.py -u --no-coverage --durations 20 - - 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 - - - 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 }} + 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 - - name: Merge coverage - run: | - mv libensemble/tests/.cov* . + tcp-smoke: + 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 TCP smoke tests + run: >- + pixi run -e py312 ./libensemble/tests/run_tests.py -r -t + --no-coverage --fail-fast --durations 20 --timings-json timings-tcp.json + --match test_1d_sampling.py + --match test_persistent_uniform_sampling.py + --match test_worker_exceptions.py + - name: Upload timings + if: always() + uses: actions/upload-artifact@v4 + with: + name: tcp-smoke-timings + path: timings-tcp.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 From dd7df6b264f5708fa036a05f1b3bf17dd5598575 Mon Sep 17 00:00:00 2001 From: jlnav Date: Fri, 18 Sep 2026 15:21:07 -0500 Subject: [PATCH 2/2] remove tcp-smoke job --- .github/workflows/basic.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index e31739402..0a7da2686 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -87,34 +87,6 @@ jobs: path: timings-${{ matrix.comms }}.json if-no-files-found: ignore - tcp-smoke: - 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 TCP smoke tests - run: >- - pixi run -e py312 ./libensemble/tests/run_tests.py -r -t - --no-coverage --fail-fast --durations 20 --timings-json timings-tcp.json - --match test_1d_sampling.py - --match test_persistent_uniform_sampling.py - --match test_worker_exceptions.py - - name: Upload timings - if: always() - uses: actions/upload-artifact@v4 - with: - name: tcp-smoke-timings - path: timings-tcp.json - if-no-files-found: ignore - macos-smoke: if: "! github.event.pull_request.draft" runs-on: macos-latest