From 9b9cd964506730267fa090e6ff08007b2d07f581 Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Fri, 30 Jan 2026 09:15:32 +0545 Subject: [PATCH 1/9] fix: add ARM architecture support for conda installation --- setup.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 9b264ad..22303f2 100644 --- a/setup.sh +++ b/setup.sh @@ -17,8 +17,22 @@ 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" + # Detect architecture + case "$(uname -m)" in + x86_64) + export CONDA_ARCH=x86_64 + ;; + arm64|aarch64) + export CONDA_ARCH=arm64 + ;; + *) + echo "Unsupported architecture: $(uname -m)" + 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 @@ -28,7 +42,7 @@ function install_conda { CONDA_SH=$HOME/miniconda/etc/profile.d/conda.sh source $CONDA_SH echo Activated conda by sourcing $CONDA_SH -} +} From 61db23d4528ec0f9147d014ff6006da5ec89d564 Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Fri, 30 Jan 2026 09:29:37 +0545 Subject: [PATCH 2/9] fix: use correct architecture naming for Linux ARM systems --- setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 22303f2..761d79d 100644 --- a/setup.sh +++ b/setup.sh @@ -23,7 +23,11 @@ function install_conda { export CONDA_ARCH=x86_64 ;; arm64|aarch64) - export CONDA_ARCH=arm64 + if [ "$CONDA_OS" = "MacOSX" ]; then + export CONDA_ARCH=arm64 + else + export CONDA_ARCH=aarch64 + fi ;; *) echo "Unsupported architecture: $(uname -m)" From 6ff269fbdb5bf6d9a9d6080069e43c7e95013f46 Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Sat, 31 Jan 2026 20:22:28 +0545 Subject: [PATCH 3/9] refactor: simplify architecture detection logic --- setup.sh | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/setup.sh b/setup.sh index 761d79d..befe2c9 100644 --- a/setup.sh +++ b/setup.sh @@ -17,20 +17,15 @@ function install_conda { exit 1;; esac - # Detect architecture - case "$(uname -m)" in - x86_64) - export CONDA_ARCH=x86_64 - ;; - arm64|aarch64) - if [ "$CONDA_OS" = "MacOSX" ]; then - export CONDA_ARCH=arm64 - else - export CONDA_ARCH=aarch64 - fi - ;; + # Setting architecture based on input + CONDA_ARCH=$(uname -m) + + case $CONDA_ARCH in + x86_64) : ;; + arm64) : ;; + aarch64) : ;; *) - echo "Unsupported architecture: $(uname -m)" + echo "Installation only supported on x86_64 and arm architectures" exit 1 ;; esac @@ -91,5 +86,4 @@ fi echo "Activating environment..." conda activate ${MULE_ENV_NAME} -cd ${MULE_DIR} - +cd ${MULE_DIR} \ No newline at end of file From d768557b41b8504d7230d1fee0bd9562498d26cf Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Tue, 3 Feb 2026 20:42:45 +0545 Subject: [PATCH 4/9] ci: add multi-architecture testing to GHA workflow --- .github/workflows/testsuite.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index ea91efa..650bd75 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -13,7 +13,11 @@ 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-13 # macOS x86_64 runs-on: ${{ matrix.platform }} steps: @@ -21,16 +25,7 @@ jobs: - 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 - - echo - echo "************************************" - echo ----------Conda Installed----------- - echo "************************************" - echo - + # Use setup.sh to handle architecture detection automatically source setup.sh echo From aea1efe70a64da44ff219af6e1f15cec694113bf Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Wed, 4 Feb 2026 12:51:57 +0545 Subject: [PATCH 5/9] fix: address PR review - update runner, add conda init, handle CI prompts --- .github/workflows/testsuite.yml | 5 +++-- setup.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 650bd75..7614285 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -17,7 +17,7 @@ jobs: - ubuntu-24.04 - ubuntu-24.04-arm64 - macos-14 # macOS ARM (M1/M2/M3/M4) - - macos-13 # macOS x86_64 + - macos-15-intel # macOS x86_64 runs-on: ${{ matrix.platform }} steps: @@ -26,7 +26,8 @@ jobs: - name: Test suite run: | # Use setup.sh to handle architecture detection automatically - source setup.sh + # Pipe 1 to auto-select Yes for conda installation if needed + echo 1 | source setup.sh echo echo "************************************" diff --git a/setup.sh b/setup.sh index befe2c9..5281405 100644 --- a/setup.sh +++ b/setup.sh @@ -22,7 +22,7 @@ function install_conda { case $CONDA_ARCH in x86_64) : ;; - arm64) : ;; + arm64) : ;; aarch64) : ;; *) echo "Installation only supported on x86_64 and arm architectures" @@ -40,6 +40,7 @@ function install_conda { bash miniconda.sh -b -p $HOME/miniconda CONDA_SH=$HOME/miniconda/etc/profile.d/conda.sh source $CONDA_SH + conda init echo Activated conda by sourcing $CONDA_SH } From 41e9732a15b63ec5d44a1f1d4851e2ab4968df8d Mon Sep 17 00:00:00 2001 From: Rusil Koirala Date: Wed, 4 Feb 2026 17:32:58 +0545 Subject: [PATCH 6/9] fix: stabilize conda init in CI --- .github/workflows/testsuite.yml | 10 +++++++--- setup.sh | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 7614285..694a0d5 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -26,8 +26,11 @@ jobs: - name: Test suite run: | # Use setup.sh to handle architecture detection automatically - # Pipe 1 to auto-select Yes for conda installation if needed - echo 1 | source setup.sh + # Provide input to auto-select Yes for conda installation if needed + source setup.sh <<< "1" + + # Ensure pytest is available in the conda environment + conda run -n MULE-3.12-10-24 python -m pip install -U pytest echo echo "************************************" @@ -35,4 +38,5 @@ jobs: 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 diff --git a/setup.sh b/setup.sh index 5281405..beae4d6 100644 --- a/setup.sh +++ b/setup.sh @@ -39,9 +39,10 @@ function install_conda { fi bash miniconda.sh -b -p $HOME/miniconda CONDA_SH=$HOME/miniconda/etc/profile.d/conda.sh - source $CONDA_SH - conda init - 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 } @@ -66,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]:' @@ -85,6 +94,10 @@ then fi echo "Activating environment..." -conda activate ${MULE_ENV_NAME} +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} \ No newline at end of file From 3ac7245309aebd779481fceff895711e713cb251 Mon Sep 17 00:00:00 2001 From: Ian0sborne Date: Wed, 29 Apr 2026 10:52:55 +0100 Subject: [PATCH 7/9] remove ubuntu arm64 --- .github/workflows/testsuite.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 694a0d5..ba4916b 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -15,7 +15,6 @@ jobs: python-version: [3.12] 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 }} From c7d4e99bba347a4dccedb4d897f4472846580453 Mon Sep 17 00:00:00 2001 From: Ian0sborne Date: Wed, 29 Apr 2026 10:54:22 +0100 Subject: [PATCH 8/9] remove line that breaks tests --- .github/workflows/testsuite.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index ba4916b..baac645 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -28,9 +28,6 @@ jobs: # Provide input to auto-select Yes for conda installation if needed source setup.sh <<< "1" - # 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----------------- From 2784ab1d5f21d12389a05d5911ab63f9318e8efc Mon Sep 17 00:00:00 2001 From: Ian0sborne Date: Wed, 29 Apr 2026 11:29:19 +0100 Subject: [PATCH 9/9] remove `python=$PYTHON_VERSION` from `setup.sh` --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index beae4d6..19e97d6 100644 --- a/setup.sh +++ b/setup.sh @@ -90,7 +90,7 @@ fi if ! (conda env list | grep ${MULE_ENV_NAME}) >> /dev/null then echo "Couldn't find environment, creating environment..." - conda env create -f MULE_environment.yml python=$PYTHON_VERSION + conda env create -f MULE_environment.yml fi echo "Activating environment..."