Skip to content

Commit

Permalink
use CI to upload code coverage results to coveralls.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Aug 5, 2023
2 parents dbb9690 + 0202cc2 commit 01e03ae
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 53 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Audit
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Coverage

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build AIR constraints
run: make build-constraints

- name: Install tarpaulin
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-tarpaulin
version: "^0.26"

- name: Run tarpaulin
run: cargo tarpaulin --all-features --all-targets --workspace --engine llvm --timeout 600 --out Lcov

- name: Upload coverage to coveralls.io
uses: coverallsapp/github-action@v2

- name: Archive coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: lcov.info
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Rust

jobs:
build:
name: Build, lint, test and bench
name: Build, lint, test, bench, coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -47,20 +47,14 @@ jobs:
- name: Build constraints
run: make build-constraints

- name: Build tests
run: make build-tests

- name: Build bench
run: make build-bench

- name: Run fmt
run: make fmt-only

- name: Run clippy
run: make clippy-only

- name: Run tests
run: make test
run: cargo test --all-targets

- name: Run benchmarks
run: make bench
run: cargo bench --all-targets
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ build-constraints:

clean-constraints:
git restore --staged triton-vm/src/table/constraints.rs
git restore --staged triton-vm/src/table/degree_lowering_table.rs
git restore triton-vm/src/table/constraints.rs
git restore triton-vm/src/table/degree_lowering_table.rs

fmt-only:
cargo fmt $(FMT_ARGS)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![GitHub CI](https://github.com/TritonVM/triton-vm/actions/workflows/main.yml/badge.svg)](https://github.com/TritonVM/triton-vm/actions)
[![crates.io](https://img.shields.io/crates/v/triton-vm.svg)](https://crates.io/crates/triton-vm)
[![Spec: online](https://img.shields.io/badge/Spec-online-success)](https://triton-vm.org/spec/)
[![Coverage Status](https://coveralls.io/repos/github/TritonVM/triton-vm/badge.svg?branch=master)](https://coveralls.io/github/TritonVM/triton-vm?branch=master)

Triton is a virtual machine that comes with Algebraic Execution Tables (AET) and Arithmetic Intermediate Representations (AIR) for use in combination with a [STARK proof system](https://neptune.cash/learn/stark-anatomy/).
It defines a Turing complete [Instruction Set Architecture](https://triton-vm.org/spec/isa.html), as well as the corresponding [arithmetization](https://triton-vm.org/spec/arithmetization.html) of the VM.
Expand Down
44 changes: 0 additions & 44 deletions code_coverage.sh

This file was deleted.

0 comments on commit 01e03ae

Please sign in to comment.