Skip to content

Commit 33e73e0

Browse files
TheDan64sunjay
authored andcommitted
Sudo-less travis (#7)
1 parent 0f52a3e commit 33e73e0

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: rust
22

3+
sudo: false
4+
35
rust:
46
- stable
57
- beta
@@ -13,9 +15,6 @@ env:
1315
global:
1416
- RUSTFLAGS="-C link-dead-code"
1517

16-
before_install:
17-
- sudo apt-get update
18-
1918
addons:
2019
apt:
2120
packages:
@@ -34,10 +33,9 @@ after_success: |
3433
cd build &&
3534
cmake .. &&
3635
make &&
37-
sudo make install &&
36+
make install DESTDIR=../../kcov-build &&
3837
cd ../.. &&
3938
rm -rf kcov-master &&
40-
for file in target/debug/examplerust-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
39+
for file in target/debug/examplerust-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
4140
bash <(curl -s https://codecov.io/bash) &&
4241
echo "Uploaded code coverage"
43-

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ of Rust you desire.
6767
```yml
6868
language: rust
6969

70+
sudo: false
71+
7072
rust:
7173
- stable
7274
- beta
@@ -80,9 +82,6 @@ env:
8082
global:
8183
- RUSTFLAGS="-C link-dead-code"
8284

83-
before_install:
84-
- sudo apt-get update
85-
8685
addons:
8786
apt:
8887
packages:
@@ -101,10 +100,10 @@ after_success: |
101100
cd build &&
102101
cmake .. &&
103102
make &&
104-
sudo make install &&
103+
make install DESTDIR=../../kcov-build &&
105104
cd ../.. &&
106105
rm -rf kcov-master &&
107-
for file in target/debug/<PROJECT-NAME>-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
106+
for file in target/debug/examplerust-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
108107
bash <(curl -s https://codecov.io/bash) &&
109108
echo "Uploaded code coverage"
110109
```

0 commit comments

Comments
 (0)