From e76fa5318425ce70c239e54da0596959e9769f20 Mon Sep 17 00:00:00 2001 From: Andrew Simms Date: Wed, 17 Apr 2024 10:46:16 -0600 Subject: [PATCH] Actions: Set pyenv after setting path on Windows --- .github/workflows/windows_unit_tests.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows_unit_tests.yml b/.github/workflows/windows_unit_tests.yml index b61c17be..6569ca37 100644 --- a/.github/workflows/windows_unit_tests.yml +++ b/.github/workflows/windows_unit_tests.yml @@ -339,11 +339,6 @@ jobs: # because: Peer process exited before transport type handshake. Exit status: 3221226505 # ERROR: MATLAB error Exit Status: 0x00000001 # exit status 1 - - name: Configure MATLAB pyenv Version and ExecutionMode - if: ${{ matrix.os == 'windows-latest' }} - shell: pwsh - run: > - "pyenv(Version='{0}', ExecutionMode='InProcess')" -f (python -c "import sys; print(sys.executable)") | Out-File -FilePath run.m # - name: Add Python Dir to Path # if: ${{ matrix.os == 'windows-latest' }} @@ -356,7 +351,13 @@ jobs: shell: bash -l {0} run: | conda activate MHKIT_CONDA_ENV - printf "getenv('path')\nsetenv('path', ['%s;', getenv('path')])\ngetenv('path')\n" $(python -c "import sys; import os; print(os.path.dirname(sys.executable))") >> run.m + printf "getenv('path')\nsetenv('path', ['%s;', getenv('path')])\ngetenv('path')\n" $(python -c "import sys; import os; print(os.path.dirname(sys.executable))") > run.m + + - name: Configure MATLAB pyenv Version and ExecutionMode + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: > + "pyenv(Version='{0}', ExecutionMode='InProcess')" -f (python -c "import sys; print(sys.executable)") | Out-File -FilePath run.m -Append - name: Add MATLAB test commands shell: bash