diff --git a/.github/workflows/unit_tests_and_docs.yml b/.github/workflows/unit_tests_and_docs.yml index dbe6ea7b..69989730 100644 --- a/.github/workflows/unit_tests_and_docs.yml +++ b/.github/workflows/unit_tests_and_docs.yml @@ -16,14 +16,22 @@ jobs: unit_test_and_docs: # Run on Ubuntu runs-on: ubuntu-latest + # Ensures conda environment is initialized for all steps + defaults: + run: + shell: bash -l {0} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v3 with: - python-version: 3.9 + auto-update-conda: true + channels: conda-forge + python-version: "3.10" + conda-remove-defaults: true - name: Install, run unit test, build docs run: | @@ -37,16 +45,14 @@ jobs: echo "============================================================="; echo "Create conda environment"; echo "============================================================="; - source $CONDA/etc/profile.d/conda.sh; - echo $CONDA/bin >> $GITHUB_PATH; - conda create -n OpenMDAO -c conda-forge python=3.9 mamba=1.5.1 -q -y; - conda activate OpenMDAO; + conda install -c conda-forge mamba -q -y; + mamba install -c conda-forge openmpi openmpi-mpicxx -q -y; + mamba install -c conda-forge lapack -q -y; pip install --upgrade pip; - conda install numpy=1.26 scipy=1.13 -q -y; echo "============================================================="; echo "Install PETSc"; echo "============================================================="; - mamba install -c conda-forge mpi4py petsc4py=3.20 -q -y; + mamba install -c conda-forge "petsc>=3.19,!=3.22.3" petsc4py "numpy<2" -q -y; echo "============================================================="; echo "Install OpenMDAO"; echo "=============================================================";