diff --git a/.github/workflows/pull_mps.yml b/.github/workflows/pull_mps.yml index d24265f1175..abba352cc6c 100644 --- a/.github/workflows/pull_mps.yml +++ b/.github/workflows/pull_mps.yml @@ -29,6 +29,8 @@ jobs: id: gather-models-mps run: | set -eux + if conda info --envs | grep -q conda-env-${{ runner.os }}; then echo "base already exists"; else conda create -y -n conda-env-${{ runner.os }}; fi + conda activate conda-env-${{ runner.os }} source .ci/scripts/utils.sh # This is a simple Python script but as it tries to import executorch.examples.models, # it requires a whole bunch of ExecuTorch dependencies on the Docker image @@ -49,6 +51,10 @@ jobs: - name: Run test ${{ matrix.test }} if: always() run: | + set -eux + if conda info --envs | grep -q conda-env-${{ runner.os }}; then echo "base already exists"; else conda create -y -n conda-env-${{ runner.os }}; fi + conda activate conda-env-${{ runner.os }} + WORKSPACE=$(pwd) pushd "${WORKSPACE}" MODEL_NAME=${{ matrix.model }} @@ -73,6 +79,10 @@ jobs: - name: Run test ${{ matrix.test }} if: always() run: | + set -eux + if conda info --envs | grep -q conda-env-${{ runner.os }}; then echo "base already exists"; else conda create -y -n conda-env-${{ runner.os }}; fi + conda activate conda-env-${{ runner.os }} + WORKSPACE=$(pwd) pushd "${WORKSPACE}" MODEL_NAME=${{ matrix.model }}