|
24 | 24 | - name: Run tests
|
25 | 25 | run: cargo test --features profiling -- --nocapture
|
26 | 26 |
|
| 27 | + extrae-rs-executables: |
| 28 | + name: Run extrae-rs sw counter tests |
| 29 | + runs-on: ubuntu-latest |
| 30 | + |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + - name: Install Rust |
| 34 | + uses: actions-rs/toolchain@v1 |
| 35 | + with: |
| 36 | + toolchain: stable |
| 37 | + |
| 38 | + - name: Build everything |
| 39 | + run: cargo build --features profiling |
| 40 | + |
| 41 | + - name: Enable perf permissions |
| 42 | + run: sudo sysctl -w kernel.perf_event_paranoid=1 |
| 43 | + |
| 44 | + - name: Run test threads |
| 45 | + run: | |
| 46 | + cargo run --bin program_declarative --features profiling |
| 47 | + cargo run --bin program_procedural --features profiling |
| 48 | + cargo run --bin program_tokio --features profiling |
| 49 | + cargo run --bin program_threads --features profiling |
| 50 | +
|
27 | 51 | extrae-rs-hwcounters:
|
28 | 52 | name: Run extrae-rs sw counter tests
|
29 | 53 | runs-on: ubuntu-latest
|
|
44 | 68 | - name: Run test threads
|
45 | 69 | env:
|
46 | 70 | EXTRAE_counters: "cpu-migrations,context-switches"
|
47 |
| - run: ./target/debug/program_threads |
| 71 | + run: | |
| 72 | + cargo run --bin program_declarative --features profiling |
| 73 | + cargo run --bin program_procedural --features profiling |
| 74 | + cargo run --bin program_tokio --features profiling |
| 75 | + cargo run --bin program_threads --features profiling |
| 76 | +
|
| 77 | +
|
| 78 | +
|
| 79 | + coverage: |
| 80 | + name: Coverage on ubuntu |
| 81 | + runs-on: ubuntu-latest |
| 82 | + needs: [extrae-rs-tests, extrae-rs-executables, extrae-rs-hwcounters] |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + - name: Install Rust |
| 86 | + uses: actions-rs/toolchain@v1 |
| 87 | + with: |
| 88 | + toolchain: stable |
| 89 | + override: true |
| 90 | + |
| 91 | + - name: Install grcov |
| 92 | + run: cargo install grcov |
| 93 | + |
| 94 | + - name: Install llvm-tools |
| 95 | + run: rustup component add llvm-tools-preview |
| 96 | + |
| 97 | + - name: Enable perf permissions |
| 98 | + run: sudo sysctl -w kernel.perf_event_paranoid=1 |
| 99 | + |
| 100 | + - name: Run tests with coverage |
| 101 | + env: |
| 102 | + EXTRAE_counters: "cpu-migrations,context-switches" |
| 103 | + RUSTFLAGS: "-Cinstrument-coverage" |
| 104 | + LLVM_PROFILE_FILE: "extrae-rs-%p-%m.profraw" |
| 105 | + run: | |
| 106 | + cargo run --bin program_declarative --features profiling |
| 107 | + cargo run --bin program_procedural --features profiling |
| 108 | + cargo run --bin program_tokio --features profiling |
| 109 | + cargo run --bin program_threads --features profiling |
| 110 | + grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./lcov.info |
| 111 | +
|
| 112 | + - name: Upload coverage to Coveralls |
| 113 | + uses: coverallsapp/github-action@master |
| 114 | + with: |
| 115 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 116 | + path-to-lcov: ./lcov.info |
0 commit comments