From 69038fc5b7fbe57b081bedc95485996eb783e0b0 Mon Sep 17 00:00:00 2001 From: Jeffrey Newman Date: Mon, 2 Sep 2024 11:18:18 -0500 Subject: [PATCH] Fix installer (#887) * change installer miniconda to v3 * assume activation * conda bootup * conda activate * ncis >= 3.01 --- .github/workflows/build_installer.yml | 4 ++-- other_resources/installer/build.sh | 4 +++- other_resources/installer/build_win.sh | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_installer.yml b/.github/workflows/build_installer.yml index ca8b0fd52..e6efa4814 100644 --- a/.github/workflows/build_installer.yml +++ b/.github/workflows/build_installer.yml @@ -28,7 +28,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@35d1405e78aa3f784fe3ce9a2eb378d5eeb62169 + - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" if: contains(matrix.OS_NAME, 'Windows') @@ -41,7 +41,7 @@ jobs: run: | export ACTIVITYSIM_VERSION=${{ inputs.version }} export EXT=exe - source /c/Miniconda3/Scripts/activate; + source /c/Users/runneradmin/miniconda3/Scripts/activate; source other_resources/installer/build_win.sh; ls -alh build shell: bash diff --git a/other_resources/installer/build.sh b/other_resources/installer/build.sh index e30ce1a99..973cbd4d8 100644 --- a/other_resources/installer/build.sh +++ b/other_resources/installer/build.sh @@ -4,6 +4,8 @@ set -xe env | sort +eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)" + echo "***** Start: Building Activitysim installer *****" CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}" @@ -19,7 +21,7 @@ if [[ "$(uname)" == "Darwin" ]]; then fi # shellcheck disable=SC2154 if [[ "${TARGET_PLATFORM}" == win-* ]]; then - conda install -y "nsis=3.01" -c conda-forge --override-channels + conda install -y "nsis>=3.01" -c conda-forge --override-channels fi # pip install git+git://github.com/conda/constructor@3.3.1#egg=constructor --force --no-deps conda list diff --git a/other_resources/installer/build_win.sh b/other_resources/installer/build_win.sh index 433462c02..1a7013918 100644 --- a/other_resources/installer/build_win.sh +++ b/other_resources/installer/build_win.sh @@ -2,5 +2,6 @@ set -ex +eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)" conda install posix --yes source other_resources/installer/build.sh