diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b8da18..f27df5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 diff --git a/testbed/build.sh b/testbed/build.sh index dfd4d46..d658e99 100755 --- a/testbed/build.sh +++ b/testbed/build.sh @@ -23,7 +23,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 @@ -41,10 +41,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