Skip to content

Commit

Permalink
Allow overriding the architecture when bootstrapping conda base
Browse files Browse the repository at this point in the history
  • Loading branch information
tskisner committed Mar 23, 2024
1 parent 62f819b commit 5300b2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
test:
name: Tests on ${{ matrix.arch }} with Conda Python-${{ matrix.python }}
name: Conda ${{ matrix.arch }} on ${{ matrix.os }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
env:
CI: "1"
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
rm -rf /usr/share/miniconda
rm -rf /usr/local/miniconda
./tools/bootstrap_base.sh ~/conda
./tools/bootstrap_base.sh ~/conda ${{ matrix.arch }}
- name: Check Conda Config
run: |
Expand Down
11 changes: 9 additions & 2 deletions tools/bootstrap_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,25 @@ popd >/dev/null 2>&1

show_help () {
echo "" >&2
echo "Usage: $0 <base install directory>" >&2
echo "Usage: $0 <base install directory> <optional arch string>" >&2
echo "" >&2
}

base=$1
arch=$2

if [ -z ${base} ]; then
show_help
exit 1
fi

inst=$(eval "${scriptdir}/fetch_check.sh" https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh miniforge.sh)
if [ -z ${arch} ]; then
arch="$(uname)-$(uname -m)"
fi

echo "Bootstrap conda base for architecture ${arch} ..."

inst=$(eval "${scriptdir}/fetch_check.sh" https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${arch}.sh miniforge.sh)

bash "${inst}" -b -f -p "${base}"

Expand Down

0 comments on commit 5300b2b

Please sign in to comment.