Skip to content

Commit

Permalink
Merge pull request #28 from simonsobs/more_tests
Browse files Browse the repository at this point in the history
Run tests on macos arm-based runners
  • Loading branch information
tskisner authored Mar 25, 2024
2 parents 18c0885 + 5300b2b commit fe58d8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
12 changes: 6 additions & 6 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 All @@ -25,10 +25,10 @@ jobs:
- os: ubuntu-latest
python: "3.11"
arch: Linux-x86_64
- os: macos-latest
python: "3.10"
- os: macos-12
python: "3.11"
arch: MacOSX-x86_64
- os: macos-latest
- os: macos-14
python: "3.11"
arch: MacOSX-x86_64
steps:
Expand All @@ -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 All @@ -57,7 +57,7 @@ jobs:
pyver=${{ matrix.python }} &&
sed -i -E "s/python=3\.[[:digit:]]+.*/python=${pyver}/" ./config/default/packages_conda.txt &&
cat ./config/default/packages_conda.txt &&
if [ ${{ matrix.os }} = "macos-latest" ]; then \
if [[ ${{ matrix.os }} == "macos-12" || ${{ matrix.os }} == "macos-14" ]]; then \
./soconda.sh -e soconda -v CI -c binary; \
else \
./soconda.sh -e soconda -v CI -c default; \
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 fe58d8d

Please sign in to comment.