Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
anaconda-renovate[bot] authored and mcg1969 committed Nov 4, 2024
1 parent 513cd01 commit 04f27fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ jobs:
name: Set CONDA_ROOT
run: |
CONDA_ROOT=$(dirname $GITHUB_WORKSPACE)/conda
echo "::set-output name=value::$CONDA_ROOT"
echo "value=$CONDA_ROOT" >> $GITHUB_OUTPUT
echo "CONDA_ROOT=$CONDA_ROOT" >> $GITHUB_ENV
echo "CONDA_ROOT: $CONDA_ROOT"
# Use a smaller cache entry to enable a quicker exit if we
# have already built the testbed. Any small file will do
- id: cache-key
Expand All @@ -42,6 +41,12 @@ jobs:
with:
path: ${{ steps.conda-root.outputs.value }}
key: testbed-${{ matrix.os }}-${{ hashFiles('testbed') }}
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v3
if: steps.cache-key.outputs.cache-hit != 'true'
with:
auto-activate-base: true
activate-environment: ""
- name: Verify or build the testbed
if: steps.cache-key.outputs.cache-hit != 'true'
# The argument tells the script we are in caching mode
Expand Down
10 changes: 6 additions & 4 deletions testbed/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Determine the root location of the testbed
cwd=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)
[ $TESTBED_ROOT ] && CONDA_ROOT=$TESTBED_ROOT
[ $CONDA_ROOT ] || CONDA_ROOT=${cwd%/*/*}/nbckdev
mkdir -p $CONDA_ROOT
export CONDA_ROOT=$(cd $CONDA_ROOT && pwd)
Expand All @@ -23,7 +24,7 @@ function full_deactivate {

# Skip creation if the cached version is available
if [ ! -d $CONDA_ROOT/conda-meta ]; then
${CONDA_EXE:-conda} env create -f $cwd/croot.yml -p $CONDA_ROOT
${CONDA_EXE:-conda} env create --file=$cwd/croot.yml -p $CONDA_ROOT
if [[ "$RUNNER_OS" == "" && "$OS" == "Windows_NT" ]]; then
conda install -y -p $CONDA_ROOT m2-bash m2-coreutils m2-filesystem
fi
Expand All @@ -41,10 +42,11 @@ if [ ! -f $CONDA_ROOT/.created ]; then
# including an R kernel, a Python kernel, and environment names with at
# least one non-ASCII character and one space. We also need one environment
# installed in a non-default environment location.
conda env create -f $cwd/testenv1.yaml
conda env create -f $cwd/testenv2.yaml
conda config --prepend channels conda-forge --system
conda env create --file=$cwd/testenv1.yaml
conda env create --file=$cwd/testenv2.yaml
mkdir -p $CONDA_ROOT/ext1/ext2/env
conda env create -f $cwd/testenv1.yaml -p $CONDA_ROOT/ext1/ext2/env/test_env1
conda env create --file=$cwd/testenv1.yaml -p $CONDA_ROOT/ext1/ext2/env/test_env1
rm -rf $CONDA_ROOT/pkgs

touch $CONDA_ROOT/.created
Expand Down

0 comments on commit 04f27fe

Please sign in to comment.