From 3a43eecbf888f5d8c22f821833e24c6de2467578 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Wed, 13 Nov 2024 10:07:25 -0700 Subject: [PATCH] Upgrade miniconda (#492) * bump version of miniconda used - keep same python version * handle chip architectures in shell script * set CI to not fail-fast * bump ThermalNetwork version used in sdk cli (#493) --- .github/workflows/nightly_ci_build.yml | 1 + example_files/python_deps/dependencies.json | 2 +- example_files/python_deps/install_python.sh | 30 ++++++++++++++++----- lib/uo_cli.rb | 2 +- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly_ci_build.yml b/.github/workflows/nightly_ci_build.yml index f579be2b..7b2dc4c1 100644 --- a/.github/workflows/nightly_ci_build.yml +++ b/.github/workflows/nightly_ci_build.yml @@ -22,6 +22,7 @@ env: jobs: weeknight-tests: strategy: + fail-fast: false matrix: # os: container operations in GHA only work on Ubuntu # https://docs.github.com/en/actions/using-containerized-services/about-service-containers diff --git a/example_files/python_deps/dependencies.json b/example_files/python_deps/dependencies.json index 72522a02..73044782 100644 --- a/example_files/python_deps/dependencies.json +++ b/example_files/python_deps/dependencies.json @@ -1,5 +1,5 @@ [ - { "name": "ThermalNetwork", "version": "0.2.5"}, + { "name": "ThermalNetwork", "version": "0.3.0"}, { "name": "urbanopt-ditto-reader", "version": "0.6.4"}, { "name": "NREL-disco", "version": "0.5.1"}, { "name": "geojson-modelica-translator", "version": "0.8.0"} diff --git a/example_files/python_deps/install_python.sh b/example_files/python_deps/install_python.sh index db995d0a..6fd056da 100755 --- a/example_files/python_deps/install_python.sh +++ b/example_files/python_deps/install_python.sh @@ -77,13 +77,29 @@ if [ ! -d $INSTALL_BASE ]; then exit 1 fi -if [[ "$OSTYPE" == "linux-gnu" ]]; then - PLATFORM=Linux-x86_64 -elif [[ "$OSTYPE" == "darwin"* ]]; then - PLATFORM=MacOSX-x86_64 -else - error "unknown OS type $OSTYPE" - exit 1 +architecture=$(uname -m) + +echo "$architecture" + +# Handle multiple chip architectures (ARM & x86) as well as OS types (Linux & MacOS) +if [[ $architecture == "x86"* || $architecture == "i686" || $architecture == "i386" ]]; then + if [[ "$OSTYPE" == "linux-gnu" ]]; then + PLATFORM=Linux-x86_64 + elif [[ "$OSTYPE" == "darwin"* ]]; then + PLATFORM=MacOSX-x86_64 + else + error "unknown OS type $OSTYPE" + exit 1 + fi +elif [[ $architecture == "arm"* || $architecture == "aarch"* ]]; then + if [[ "$OSTYPE" == "linux-gnu" ]]; then + PLATFORM=Linux-aarch64 + elif [[ "$OSTYPE" == "darwin"* ]]; then + PLATFORM=MacOSX-arm64 + else + error "unknown OS type $OSTYPE" + exit 1 + fi fi CONDA_PACKAGE_NAME=Miniconda3-py${PYTHON_MAJOR_MINOR}_${CONDA_VERSION}-${PLATFORM}.sh diff --git a/lib/uo_cli.rb b/lib/uo_cli.rb index 9b031fc8..a6e9db40 100755 --- a/lib/uo_cli.rb +++ b/lib/uo_cli.rb @@ -905,7 +905,7 @@ def self.update_project(existing_project_folder, new_project_directory) def self.setup_python_variables pvars = { python_version: '3.10', - miniconda_version: '4.12.0', + miniconda_version: '24.9.2-0', python_install_path: nil, python_path: nil, pip_path: nil,