This repository was archived by the owner on Aug 12, 2024. It is now read-only.
File tree 2 files changed +51
-3
lines changed
2 files changed +51
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+
7
+ jobs :
8
+ deploy :
9
+
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+
15
+ - name : rust-toolchain
16
+ uses :
actions-rs/[email protected]
17
+ with :
18
+ toolchain : nightly
19
+ profile : minimal
20
+
21
+ - name : Install LLVM tools
22
+ run : |
23
+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
24
+ sudo ln -s /usr/bin/llvm-cov-11 /usr/bin/llvm-cov
25
+ sudo ln -s /usr/bin/llvm-profdata-11 /usr/bin/llvm-profdata
26
+
27
+ - name : Generate Coverage
28
+ run : |
29
+ sh cov.sh --json
30
+ sh cov.sh --html
31
+
32
+ - name : Move to Deploy Directory
33
+ run : |
34
+ mkdir out
35
+ mv cov.json out/cov.json
36
+ mv cov/rustc-semver/* out/
37
+
38
+ - name : Deploy to GitHub Pages
39
+
40
+ with :
41
+ ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
42
+ GITHUB_TOKEN : ${{ github.token }}
43
+ BRANCH : gh-pages
44
+ FOLDER : out
45
+ TARGET_FOLDER : ' .'
46
+ COMMIT_MESSAGE : ' Automatic deploy of coverage'
47
+ GIT_CONFIG_NAME : GHA
48
+ GIT_CONFIG_EMAIL :
[email protected]
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ rm -rf cov/*
4
4
5
5
RUSTFLAGS=" -Zinstrument-coverage" \
6
6
LLVM_PROFILE_FILE=" $( pwd) /cov/rustc-semver%m.profraw" \
7
- cargo +nightly test > /dev/null 2>&1
7
+ cargo +nightly test
8
8
9
9
llvm-profdata merge -sparse cov/rustc-semver* .profraw -o cov/rustc-semver.profdata
10
10
@@ -14,10 +14,10 @@ case $1 in
14
14
--instr-profile=cov/rustc-semver.profdata \
15
15
--summary-only \
16
16
--format=text \
17
- $( find target/debug/deps -executable -type f)
17
+ $( find target/debug/deps -executable -type f) | python3 -m json.tool > cov.json
18
18
;;
19
19
" --html" )
20
- cargo install rustfilt > /dev/null 2>&1
20
+ cargo install rustfilt
21
21
llvm-cov show \
22
22
--instr-profile=cov/rustc-semver.profdata \
23
23
--Xdemangler=rustfilt \
You can’t perform that action at this time.
0 commit comments