Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

dbs-virtio-devices: add metrics for net device #1117

dbs-virtio-devices: add metrics for net device

dbs-virtio-devices: add metrics for net device #1117

Workflow file for this run

name: UT
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: cargo, llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cache dependencies
uses: actions/cache@v2
env:
cache-name: cache-cargo-dependencies
with:
path: |
~/.cargo/.crates2.json
~/.cargo/.crates.toml
~/.cargo/registry/
~/.cargo/git/
~/.cargo/bin/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Test dbs-address-space
run: cargo llvm-cov --all-features -p dbs-address-space --lcov --output-path dbs-address-space.info
- name: Test dbs-allocator
run: cargo llvm-cov --all-features -p dbs-allocator --lcov --output-path dbs-allocator.info
- name: Test dbs-arch
run: cargo llvm-cov --all-features -p dbs-arch --lcov --output-path dbs-arch.info
- name: Test dbs-boot
run: cargo llvm-cov --all-features -p dbs-boot --lcov --output-path dbs-boot.info
- name: Test dbs-device
run: cargo llvm-cov --all-features -p dbs-device --lcov --output-path dbs-device.info
- name: Test dbs-interrupt
run: cargo llvm-cov --all-features -p dbs-interrupt --lcov --output-path dbs-interrupt.info
- name: Test dbs-legacy-devices
run: cargo llvm-cov --all-features -p dbs-legacy-devices --lcov --output-path dbs-legacy-devices.info
- name: Test dbs-utils
run: cargo llvm-cov --all-features -p dbs-utils --lcov --output-path dbs-utils.info
- name: Test dbs-virtio-devices
run: cargo llvm-cov --all-features -p dbs-virtio-devices --lcov --output-path dbs-virtio-devices.info
- name: Test dbs-upcall
run: cargo llvm-cov --all-features -p dbs-upcall --lcov --output-path dbs-upcall.info
- name: Test dbs-miniball
run: cargo llvm-cov --all-features -p dbs-miniball --lcov --output-path dbs-miniball.info
- name: Collection Coverage
run: cargo llvm-cov --no-run --lcov --output-path lcov.info
- name: Save coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./*.info
if-no-files-found: error
upload_codecov:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
crate: [dbs-address-space, dbs-allocator, dbs-arch, dbs-boot, dbs-device, dbs-interrupt, dbs-legacy-devices, dbs-utils, dbs-virtio-devices, dbs-upcall, dbs-miniball]
steps:
- uses: actions/checkout@v3
- name: Download coverage
uses: actions/download-artifact@v3
with:
name: coverage
- name: Upload to CodeCov
uses: codecov/codecov-action@v3
with:
files: ${{ matrix.crate }}.info
flags: ${{matrix.crate}}
fail_ci_if_error: true
- name: Upload sum to CodeCov
uses: codecov/codecov-action@v3
with:
files: ./lcov.info
fail_ci_if_error: true