Skip to content

Commit

Permalink
Merge pull request #898 from taiki-e/cargo-llvm-cov
Browse files Browse the repository at this point in the history
Update cargo-llvm-cov and use rust 1.60.0 for coverage
  • Loading branch information
Furisto authored May 26, 2022
2 parents cdcef4a + 9db01a2 commit f6ef575
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,22 @@ jobs:
- name: Toolchain setup
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-14
toolchain: 1.60.0
override: true
profile: minimal
components: llvm-tools-preview
- name: Cache youki
uses: Swatinem/rust-cache@v1
- name: install cargo-llvm-cov
env:
CARGO_LLVM_COV_VERSION: 0.1.5
run: |
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz -qO- | tar -xzvf -
mv cargo-llvm-cov ~/.cargo/bin
uses: taiki-e/install-action@v1
with:
tool: cargo-llvm-cov@0.4.0
- name: Update System Libraries
run: sudo apt-get -y update
- name: Install System Libraries
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Run Test Coverage for youki
run: |
cd ./crates
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report
cargo llvm-cov --no-run --lcov --ignore-filename-regex "libcgroups/src/systemd/dbus/systemd_api.rs" --output-path ./coverage.lcov
Expand Down
1 change: 0 additions & 1 deletion crates/libcgroups/src/v2/devices/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub mod program;

#[cfg(test)]
#[allow(clippy::too_many_arguments)]
#[cfg_attr(coverage, feature(no_coverage))]
pub mod mocks;

pub use controller::Devices;
1 change: 0 additions & 1 deletion crates/libcontainer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg_attr(coverage, feature(no_coverage))]
pub mod apparmor;
pub mod capabilities;
pub mod config;
Expand Down
1 change: 0 additions & 1 deletion crates/libcontainer/src/syscall/linux.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Implements Command trait for Linux systems
#[cfg_attr(coverage, no_coverage)]
use std::ffi::{CStr, OsStr};
use std::fs;
use std::os::unix::ffi::OsStrExt;
Expand Down

0 comments on commit f6ef575

Please sign in to comment.