From e879d8d77e404e69c4a63cccc4ecd91ec7e532f6 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sun, 25 Aug 2024 20:54:29 +1000 Subject: [PATCH] Exclude target, cargo/rustup home from windows defender Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/actions/just-setup/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/just-setup/action.yml b/.github/actions/just-setup/action.yml index 22c04020..b5dce2f4 100644 --- a/.github/actions/just-setup/action.yml +++ b/.github/actions/just-setup/action.yml @@ -30,12 +30,21 @@ runs: env-mapping: | CARGO_HOME,{{ DEV_DRIVE }}/.cargo RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup + + - name: Exclude cargo/rustup home from windows defender + if: runner.os == 'Windows' + run: Add-MpPreference -ExclusionPath $DEV_DRIVE + - uses: samypr100/setup-dev-drive@v3 if: runner.os == 'Windows' with: mount-path: ${{ github.workspace }}/target drive-size: 3GB drive-type: Fixed + + - name: Exclude target from windows defender + if: runner.os == 'Windows' + run: Add-MpPreference -ExclusionPath $DEV_DRIVE - name: Add just to tools to install run: echo "tools=just" >>"$GITHUB_ENV"