Skip to content

Commit bee2dd7

Browse files
committed
optimize README.md
1 parent 76c74c8 commit bee2dd7

File tree

2 files changed

+64
-16
lines changed

2 files changed

+64
-16
lines changed

.github/workflows/coverage.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,34 @@ env:
1515

1616
jobs:
1717
coverage:
18-
name: Run cargo coverage
1918
runs-on: ubuntu-latest
20-
env:
21-
CARGO_TERM_COLOR: always
2219
steps:
23-
- name: Checkout sources
24-
uses: actions/checkout@v4
25-
- name: Install toolchain
26-
uses: actions-rs/toolchain@v1
20+
- uses: actions/checkout@v4
21+
- uses: actions-rs/toolchain@v1
2722
with:
28-
toolchain: 1.81.0
29-
profile: minimal
23+
toolchain: nightly-2024-08-02
3024
override: true
31-
components: llvm-tools-preview
32-
- name: Install cargo-llvm-cov
33-
uses: taiki-e/install-action@cargo-llvm-cov
34-
- name: Generate code coverage
35-
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --all --all-features --release --workspace --lcov --output-path lcov.info"
36-
- name: Upload coverage to Codecov
37-
run: bash <(curl -s https://codecov.io/bash) -f lcov.info -t ${{ secrets.CODECOV_TOKEN }}
25+
- name: Build
26+
run: cargo build --release --all-features --all --verbose
27+
- name: Run tests
28+
run: cargo test --release --all-features --all --verbose
29+
env:
30+
CARGO_INCREMENTAL: '0'
31+
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_unwind_tests'
32+
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_unwind_tests'
33+
- name: rust-grcov
34+
# You may pin to the exact commit or the version.
35+
# uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
36+
uses: actions-rs/[email protected]
37+
- name: Codecov
38+
# You may pin to the exact commit or the version.
39+
# uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
40+
uses: codecov/codecov-action@v5
41+
env:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
43+
with:
44+
# Repository upload token - get it from codecov.io. Required only for private repositories
45+
# token: # optional
46+
# Specify whether the Codecov output should be verbose
47+
verbose: true
48+
fail_ci_if_error: true

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: rust
2+
3+
sudo: required
4+
5+
rust:
6+
- stable
7+
- nightly
8+
9+
matrix:
10+
allow_failures:
11+
- rust: nightly
12+
13+
addons:
14+
apt:
15+
packages:
16+
- libcurl4-openssl-dev
17+
- libelf-dev
18+
- libdw-dev
19+
- cmake
20+
- gcc
21+
- binutils-dev
22+
- libiberty-dev
23+
24+
after_success: |
25+
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
26+
tar xzf master.tar.gz &&
27+
cd kcov-master &&
28+
mkdir build &&
29+
cd build &&
30+
cmake .. &&
31+
make &&
32+
make install DESTDIR=../../kcov-build &&
33+
cd ../.. &&
34+
rm -rf kcov-master &&
35+
for file in target/release/open-coroutine-*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
36+
bash <(curl -s https://codecov.io/bash) &&
37+
echo "Uploaded code coverage"

0 commit comments

Comments
 (0)