Skip to content

Commit

Permalink
mamba?
Browse files Browse the repository at this point in the history
  • Loading branch information
CompRhys committed Oct 8, 2024
1 parent 76eddd9 commit 6140bdb
Showing 1 changed file with 33 additions and 68 deletions.
101 changes: 33 additions & 68 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,29 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: test
auto-activate-base: false # Prevent automatic activation of the base environment
python-version: ${{ matrix.python-version }}
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main

# Run `conda init` to initialize shell for conda
- name: Initialize Conda
shell: bash -l {0}
- name: Create mamba environment
run: |
conda init bash
source ~/.bashrc # Reload shell configuration after running `conda init`
conda activate test
micromamba create -n test python=${{ matrix.python-version }} --yes
- name: Install uv
run: micromamba run -n test pip install uv

- name: Install conda-only dependencies, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda install -c conda-forge cyipopt
- name: Set up uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
micromamba install -n test -c conda-forge cyipopt --yes
- name: Install remaining dependencies, Python ${{ matrix.python-version }}
run: |
uv pip install -e ".[optimization,tests,cheminfo,xgb,entmoot]" --system
micromamba run -n test uv pip install -e ".[optimization,tests,cheminfo,xgb,entmoot]" --system
- name: Run tests, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
micromamba activate test
pytest -ra --cov=bofire --cov-report term-missing tests
testing_against_latest_botorch:
Expand All @@ -86,46 +76,33 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: test
auto-activate-base: false # Prevent automatic activation of the base environment
python-version: ${{ matrix.python-version }}
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main

# Run `conda init` to initialize shell for conda
- name: Initialize Conda
shell: bash -l {0}
- name: Create mamba environment
run: |
conda init bash
source ~/.bashrc # Reload shell configuration after running `conda init`
conda activate test
micromamba create -n test python=${{ matrix.python-version }} --yes
- name: Install uv
run: micromamba run -n test pip install uv

- name: Install conda-only dependencies, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda activate test
conda install -c conda-forge cyipopt
- name: Set up uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
micromamba install -n test -c conda-forge cyipopt --yes
- name: Install remaining dependencies, Python ${{ matrix.python-version }}
run: |
conda activate test
uv pip install --upgrade git+https://github.com/cornellius-gp/linear_operator.git --system
uv pip install --upgrade git+https://github.com/cornellius-gp/gpytorch.git --system
micromamba run -n test uv pip install --upgrade git+https://github.com/cornellius-gp/linear_operator.git --system
micromamba run -n test uv pip install --upgrade git+https://github.com/cornellius-gp/gpytorch.git --system
export ALLOW_LATEST_GPYTORCH_LINOP=true
uv pip install --upgrade git+https://github.com/pytorch/botorch.git --system
uv pip install ".[optimization,tests,cheminfo,xgb,entmoot]" --system
micromamba run -n test uv pip install --upgrade git+https://github.com/pytorch/botorch.git --system
micromamba run -n test uv pip install ".[optimization,tests,cheminfo,xgb,entmoot]" --system
- name: Run tests, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda activate test
micromamba activate test
pytest -ra --cov=bofire --cov-report term-missing tests
testing_tutorials:
Expand All @@ -137,39 +114,27 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: test
auto-activate-base: false # Prevent automatic activation of the base environment
python-version: ${{ matrix.python-version }}
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main

# Run `conda init` to initialize shell for conda
- name: Initialize Conda
shell: bash -l {0}
- name: Create mamba environment
run: |
conda init bash
source ~/.bashrc # Reload shell configuration after running `conda init`
micromamba create -n test python=${{ matrix.python-version }} --yes
- name: Install uv
run: micromamba run -n test pip install uv

- name: Install conda-only dependencies, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda activate test
conda install -c conda-forge cyipopt
- name: Set up uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
micromamba install -n test -c conda-forge cyipopt --yes
- name: Install remaining dependencies, Python ${{ matrix.python-version }}
run: |
conda activate test
uv pip install ".[optimization,tests,cheminfo,xgb,entmoot,tutorials]" --system
micromamba run -n test uv pip install ".[optimization,tests,cheminfo,xgb,entmoot,tutorials]" --system
- name: Run notebooks, Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda activate test
micromamba activate test
python scripts/run_tutorials.py -p "$(pwd)"

0 comments on commit 6140bdb

Please sign in to comment.