Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,6 @@ jobs:
- run: cargo rustdoc --lib -- -D warnings
- run: cargo rustdoc --bin pisa2ciff -- -D warnings
- run: cargo rustdoc --bin ciff2pisa -- -D warnings
code-coverage:
Comment thread
elshize marked this conversation as resolved.
name: Run code coverage
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Zinstrument-coverage
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- run: rustup component add llvm-tools-preview
- run: echo "PATH=/home/runner/.cargo/bin:$PATH" >> $GITHUB_ENV
- run: echo "7817b621f62dddfadd35fb84999b441bbce72b70cd8a61a9fe8e0998ccf75898 *grcov-v0.8.6-x86_64-unknown-linux-gnu.tar.gz" > checksums
- run: curl -sOL https://github.com/mozilla/grcov/releases/download/v0.8.6/grcov-v0.8.6-x86_64-unknown-linux-gnu.tar.gz
- run: sha256sum -c checksums --ignore-missing
- run: tar xf grcov-v0.8.6-x86_64-unknown-linux-gnu.tar.gz
- run: cargo test --verbose --workspace
- run: mkdir ./coverage
- run: ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" --ignore "build.rs" --ignore "*target*" --ignore "tests/*" --ignore "*ciff2pisa.rs" --ignore "*pisa2ciff.rs" -o ./coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
miri:
name: Miri test
runs-on: ubuntu-latest
Expand All @@ -103,4 +79,4 @@ jobs:
rustup toolchain install "nightly-$MIRI_NIGHTLY"
rustup default "nightly-$MIRI_NIGHTLY"
rustup component add miri
cargo miri test --lib
MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test --lib
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ name = "jsonl2ciff"
path = "src/jsonl2ciff.rs"

[dependencies]
protobuf = "^2.27"
protobuf = "2.28.0"
structopt = "0.3"
num-traits = "0"
indicatif = "0.15"
Expand Down
7 changes: 6 additions & 1 deletion src/jsonl2ciff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ struct Args {
input: PathBuf,
#[structopt(short, long, help = "Output basename")]
output: PathBuf,
#[structopt(short, long, help = "Quantize scores to integers")]
quantize: bool,
}

fn main() {
let args = Args::from_args();

let mut converter = JsonlToCiff::default();
converter.input_path(args.input).output_path(args.output);
converter
.input_path(args.input)
.output_path(args.output)
.quantize(args.quantize);

if let Err(error) = converter.convert() {
eprintln!("ERROR: {error}");
Expand Down
Loading
Loading