Skip to content
Open
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
24 changes: 12 additions & 12 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ jobs:
fail-fast: false
matrix:
python-version: [3.12]
platform: [ubuntu-24.04]
platform:
- ubuntu-24.04
- ubuntu-24.04-arm64
- macos-14 # macOS ARM (M1/M2/M3/M4)
- macos-15-intel # macOS x86_64
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- name: Test suite
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.9.2-0-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh
# Use setup.sh to handle architecture detection automatically
# Provide input to auto-select Yes for conda installation if needed
source setup.sh <<< "1"

echo
echo "************************************"
echo ----------Conda Installed-----------
echo "************************************"
echo

source setup.sh
# Ensure pytest is available in the conda environment
conda run -n MULE-3.12-10-24 python -m pip install -U pytest

echo
echo "************************************"
echo ---------------test-----------------
echo "************************************"
echo

PYTEST_ADDOPTS=--color=yes HYPOTHESIS_PROFILE=travis-ci python -m pytest -v
PYTEST_ADDOPTS=--color=yes HYPOTHESIS_PROFILE=travis-ci \
conda run -n MULE-3.12-10-24 python -m pytest -v
42 changes: 34 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,33 @@ function install_conda {
exit 1;;
esac

echo Installing conda for $CONDA_OS # This doesn't currently understand/recognise arm based architectures. Fix!
CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-py${PYTHON_VERSION//.}_24.9.2-0-${CONDA_OS}-x86_64.sh"
# Setting architecture based on input
CONDA_ARCH=$(uname -m)

case $CONDA_ARCH in
x86_64) : ;;
arm64) : ;;
aarch64) : ;;
*)
echo "Installation only supported on x86_64 and arm architectures"
exit 1
;;
esac

echo Installing conda for $CONDA_OS on $CONDA_ARCH architecture
CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-py${PYTHON_VERSION//.}_24.9.2-0-${CONDA_OS}-${CONDA_ARCH}.sh"
if which wget; then
wget ${CONDA_URL} -O miniconda.sh
else
curl ${CONDA_URL} -o miniconda.sh
fi
bash miniconda.sh -b -p $HOME/miniconda
CONDA_SH=$HOME/miniconda/etc/profile.d/conda.sh
source $CONDA_SH
echo Activated conda by sourcing $CONDA_SH
}
source $CONDA_SH
eval "$(conda shell.bash hook)"
conda init bash >/dev/null 2>&1 || true
echo Activated conda by sourcing $CONDA_SH
}



Expand All @@ -52,6 +67,14 @@ echo "Identified directory: $MULE_DIR"

if conda --version ; then
echo Initialising Conda...
CONDA_BASE=$(conda info --base 2>/dev/null)
if [ -n "$CONDA_BASE" ] && [ -f "$CONDA_BASE/etc/profile.d/conda.sh" ]; then
source "$CONDA_BASE/etc/profile.d/conda.sh"
eval "$(conda shell.bash hook)"
conda init bash >/dev/null 2>&1 || true
else
conda init bash >/dev/null 2>&1 || true
fi
else
echo "No Conda installation detected, installing conda."
echo 'Download conda? Select [1/2]:'
Expand All @@ -71,7 +94,10 @@ then
fi

echo "Activating environment..."
conda activate ${MULE_ENV_NAME}

cd ${MULE_DIR}
if [ -n "$CI" ]; then
echo "CI detected, skipping conda activate. Use 'conda run -n ${MULE_ENV_NAME} ...'"
else
conda activate ${MULE_ENV_NAME}
fi

cd ${MULE_DIR}
Loading