File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 11
11
cargo : true
12
12
directories :
13
13
- $HOME/.npm
14
- timeout : 600
14
+ # Set timeout to 6 minutes (double the default of 3 minutes)
15
+ timeout : 360
15
16
16
17
env :
17
18
global :
26
27
- PERCY_PROJECT=crates-io/crates.io
27
28
28
29
install :
30
+ - script/cargo-clean-on-new-rustc-version.sh
29
31
- cargo install --force diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres && export PATH=$HOME/.cargo/bin:$PATH
30
32
31
33
before_script :
@@ -68,9 +70,6 @@ matrix:
68
70
script :
69
71
- cargo build
70
72
- cargo test
71
- # This portion of the cache is quickly invalidated anyway
72
- before_cache :
73
- - cargo clean
74
73
75
74
notifications :
76
75
email :
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ stamp_file=target/rustc_version_stamp
6
+ current_version=$( rustc --version)
7
+
8
+ if [ -f $stamp_file ]; then
9
+ # Compare the current version against the previous version
10
+ if echo " $current_version " | cmp -s $stamp_file -; then
11
+ echo " Version of rustc hasn't changed, keeping the cache intact"
12
+ else
13
+ echo " The version of rustc has changed, running cargo clean"
14
+ cargo clean
15
+ fi
16
+ else
17
+ echo " There is no existing version stamp, keeping the cache intact"
18
+ fi
19
+
20
+ # Save the version stamp for next time
21
+ mkdir -p target/
22
+ echo $current_version > $stamp_file
You can’t perform that action at this time.
0 commit comments