Skip to content

Commit

Permalink
Switch to micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed Sep 29, 2023
1 parent 0ba339e commit 683b759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .ci/build/conda.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import subprocess
import sys

conda = sys.argv[1] if len(sys.argv) >= 2 else "conda"

subprocess.check_call([
"conda", "install", "--yes", "-c", "conda-forge",
conda, "install", "--yes", "-c", "conda-forge",
"boost", "cmake", "ninja", "numpy", "pybind11", "scipy", "xsimd",
"xtensor", "xtensor-python"])
22 changes: 9 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,10 @@ jobs:
run:
shell: bash -l {0}
steps:
- name: Provision (Conda, Ubuntu)
# conda is initialized in .bashrc, but we are not using a login shell
run: echo 'export PATH="/usr/share/miniconda/bin:$PATH"' >> $HOME/.bash_profile
if: ${{ matrix.packaging == 'conda' && contains(matrix.os, 'ubuntu') }}

- name: Provision (Conda, Windows)
run: C:\Miniconda\condabin\conda.bat init --all
shell: pwsh
if: ${{ matrix.packaging == 'conda' && contains(matrix.os, 'windows') }}

- name: Provision (Conda, non-Windows)
run: conda init --all
if: ${{ matrix.packaging == 'conda' && !contains(matrix.os, 'windows') }}
- uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash powershell
if: ${{ matrix.packaging == 'conda' }}

- name: Checkout latest revision
# Only the latest revision is required, as later steps do not depend on
Expand All @@ -43,8 +34,13 @@ jobs:
git fetch origin --depth=1 ${{ github.ref }}
git checkout ${{ github.ref_name }}
- name: Set-up (${{ matrix.packaging }})
run: ${{ matrix.python }} .ci/build/${{ matrix.packaging }}.py micromamba
if: ${{ matrix.packaging == 'conda' }}

- name: Set-up (${{ matrix.packaging }})
run: ${{ matrix.python }} .ci/build/${{ matrix.packaging }}.py
if: ${{ matrix.packaging != 'conda' }}

- name: Build sycomore
run: ${{ matrix.python }} ./.ci/build/build.py
Expand Down

0 comments on commit 683b759

Please sign in to comment.