Skip to content

Commit 6419c50

Browse files
committed
Change target folder for native cpu build in CI
GitHub Actions seems to have started scanning executables. However while the scan is still in progress, we redo the build for the native CPU. Cargo will then try to replace the previously built executable and fail because the scan is still in progress. By switching the target folder for the native build, we can avoid this problem.
1 parent 9352715 commit 6419c50

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ jobs:
1111
matrix:
1212
rust:
1313
# x86 without sse/sse2 on by default
14-
- { target: i586-pc-windows-msvc, toolchain: 1.52.0, os: windows-latest }
14+
- { target: i586-pc-windows-msvc, toolchain: 1.52.1, os: windows-latest }
1515
- { target: i586-pc-windows-msvc, toolchain: stable, os: windows-latest }
1616
- { target: i586-pc-windows-msvc, toolchain: beta, os: windows-latest }
1717
- { target: i586-pc-windows-msvc, toolchain: nightly, os: windows-latest }
1818
# x86
19-
- { target: i686-pc-windows-msvc, toolchain: 1.52.0, os: windows-latest }
19+
- { target: i686-pc-windows-msvc, toolchain: 1.52.1, os: windows-latest }
2020
- { target: i686-pc-windows-msvc, toolchain: stable, os: windows-latest }
2121
- { target: i686-pc-windows-msvc, toolchain: beta, os: windows-latest }
2222
- { target: i686-pc-windows-msvc, toolchain: nightly, os: windows-latest }
2323
# x86_64
24-
- { target: x86_64-pc-windows-msvc, toolchain: 1.52.0, os: windows-latest }
24+
- { target: x86_64-pc-windows-msvc, toolchain: 1.52.1, os: windows-latest }
2525
- { target: x86_64-pc-windows-msvc, toolchain: stable, os: windows-latest }
2626
- { target: x86_64-pc-windows-msvc, toolchain: beta, os: windows-latest }
2727
- { target: x86_64-pc-windows-msvc, toolchain: nightly, os: windows-latest }
2828
## arm
29-
#- { target: arm-unknown-linux-gnueabihf, toolchain: 1.52.0, os: ubuntu-latest }
29+
#- { target: arm-unknown-linux-gnueabihf, toolchain: 1.52.1, os: ubuntu-latest }
3030
#- { target: arm-unknown-linux-gnueabihf, toolchain: stable, os: ubuntu-latest }
3131
#- { target: arm-unknown-linux-gnueabihf, toolchain: beta, os: ubuntu-latest }
3232
#- { target: arm-unknown-linux-gnueabihf, toolchain: nightly, os: ubuntu-latest }
3333
## aarch64
34-
#- { target: aarch64-unknown-linux-gnu, toolchain: 1.52.0, os: ubuntu-latest }
34+
#- { target: aarch64-unknown-linux-gnu, toolchain: 1.52.1, os: ubuntu-latest }
3535
#- { target: aarch64-unknown-linux-gnu, toolchain: stable, os: ubuntu-latest }
3636
#- { target: aarch64-unknown-linux-gnu, toolchain: beta, os: ubuntu-latest }
3737
#- { target: aarch64-unknown-linux-gnu, toolchain: nightly, os: ubuntu-latest }
@@ -75,6 +75,11 @@ jobs:
7575
- name: Test with 'native' CPU features + No Default Cargo Features
7676
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi'
7777
run: cargo test --target ${{ matrix.rust.target }} --no-default-features
78+
env:
79+
CARGO_TARGET_DIR: "target-native"
80+
7881
- name: Test with 'native' CPU features + All Cargo Features
7982
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi'
8083
run: cargo test --target ${{ matrix.rust.target }} --all-features
84+
env:
85+
CARGO_TARGET_DIR: "target-native"

0 commit comments

Comments
 (0)