Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to setup-micromamba #2610

Merged
merged 6 commits into from
Jun 21, 2023
Merged
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
46 changes: 15 additions & 31 deletions .github/workflows/conda_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,35 @@ concurrency:

defaults:
run:
shell: bash -el {0}
shell: micromamba-shell {0}

jobs:
conda_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: mamba
- name: create mamba build environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-name: build_env
environment-file: mamba/mamba/environment-dev.yml
channels: conda-forge,conda-canary/label/dev
channel-priority: flexible
extra-specs: |
environment-file: ./mamba/environment-dev.yml
condarc: |
channels:
- conda-forge
- conda-canary/label/dev
channel-priority: flexible
create-args: >-
python=3.10
conda =*+*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter but the "official" Conda style is x =1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x =1 doesn't work with setup-micromamba in create-args since it splits at spaces.

conda=*+*

# Build Mamba
- uses: hendrikmuhs/ccache-action@main
with:
variant: sccache
key: ${{ github.job }}-${{ matrix.os }}
restore-keys: |
libmamba_static-${{ matrix.os }}
key: conda-canary-${{ github.job }}
restore-keys: conda-canary-
- name: build libmamba Python bindings
run: |
cd mamba
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
Expand All @@ -58,24 +57,17 @@ jobs:
ninja
ninja install
- name: install libmambapy
run: |
cd mamba
pip install -e ./libmambapy/ --no-deps
run: pip install -e ./libmambapy/ --no-deps
- name: build cache statistics
run: sccache --show-stats
- name: install mamba
run: |
cd mamba
pip install ./mamba[test] --no-deps
run: pip install ./mamba[test] --no-deps

# Test Mamba with Conda nightly
- name: run mamba tests suite
run: |
cd mamba
pytest -v --capture=tee-sys mamba/tests
run: pytest -v --capture=tee-sys mamba/tests
- name: run mamba create/update tests
run: |
cd mamba
mamba create -n test_env xtensor -c conda-forge -y
mamba env create -f mamba/tests/test_env.yml
mamba env update -f mamba/tests/update_env.yml
Expand All @@ -86,11 +78,3 @@ jobs:
filename: mamba/.github/workflows/bot_issue_template.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cleanup
if: always()
run: |
# Do not cache temporary envs with 'cache-env: true'
rm -rf $(micromamba info --json | jq -r '."env location"')/envs || true
rm -rf ~/tmproot* || true
rm -rf $(micromamba info --json | jq -r '."env location"')/conda-build/conda-bld || true
8 changes: 3 additions & 5 deletions .github/workflows/static_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ jobs:
- name: Patch micromamba-feedstock
run: |
cp ./micromamba/recipe/* micromamba-feedstock/recipe/
- uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
channels: conda-forge
environment-file: false
environment-name: mambabuild
extra-specs: boa
create-args: boa
- name: Build conda package
shell: bash -l {0}
run: |
conda mambabuild -m micromamba-feedstock/.ci_support/${{ matrix.platform }}_${{ matrix.arch }}_.yaml \
conda-mambabuild -m micromamba-feedstock/.ci_support/${{ matrix.platform }}_${{ matrix.arch }}_.yaml \
micromamba-feedstock/recipe ${{ matrix.arch != '64' && '--no-test' || '' }}
- name: Unpack micromamba package
shell: bash -l {0}
Expand Down