Disable dev drive for windows as a failed experiment

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-08-25 21:48:18 +10:00 committed by GitHub
parent 6687219cd0
commit 16fe3e3aa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,25 +22,11 @@ runs:
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: sudo spctl developer-mode enable-terminal run: sudo spctl developer-mode enable-terminal
shell: bash shell: bash
- name: Export CARGO_TARGET_DIR
if: runner.os != 'Windows'
run: |
echo "CARGO_TARGET_DIR=${{ github.workspace }}/target" >> "$GITHUB_ENV"
shell: bash
- uses: samypr100/setup-dev-drive@v3
if: runner.os == 'Windows'
with:
drive-type: Fixed
drive-size: 3GB
env-mapping: |
CARGO_TARGET_DIR,{{ DEV_DRIVE }}/target
- name: Exclude workspace and cargo/rustup home from windows defender - name: Exclude workspace and cargo/rustup home from windows defender
if: runner.os == 'Windows' if: runner.os == 'Windows'
run: | run: |
Add-MpPreference -ExclusionPath '${{ env.DEV_DRIVE }},${{ github.workspace }}' Add-MpPreference -ExclusionPath '${{ github.workspace }}'
shell: pwsh shell: pwsh
- name: Add just to tools to install - name: Add just to tools to install
@ -85,7 +71,6 @@ runs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
with: with:
env-vars: "CARGO CC CFLAGS CXX CMAKE RUST JUST" env-vars: "CARGO CC CFLAGS CXX CMAKE RUST JUST"
workspaces: . -> ${{ env.CARGO_TARGET_DIR }}
env: env:
RUSTFLAGS: ${{ steps.retrieve-rustflags.outputs.RUSTFLAGS }} RUSTFLAGS: ${{ steps.retrieve-rustflags.outputs.RUSTFLAGS }}