forked from conjure-cp/conjure-oxide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request conjure-cp#386 from ozgurakgun/coverage
revisiting coverage - an experiment
- Loading branch information
Showing
13 changed files
with
79 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ jobs: | |
- name: Add the .nojekyll file | ||
run: touch ./web/static/.nojekyll | ||
working-directory: ./tools/essence-feature-usage-stats | ||
|
||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' # Run this step only on push events | ||
uses: JamesIves/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ on: | |
push: | ||
branches: | ||
- main # run for pushes to the main branch. other branches need to create a PR if they want testing. | ||
paths: | ||
paths: | ||
- conjure_oxide/** | ||
- solvers/** | ||
- crates/** | ||
- Cargo.* | ||
- .github/workflows/test.yml | ||
- .github/workflows/code-coverage-deploy.yml | ||
pull_request: | ||
paths: | ||
paths: | ||
- conjure_oxide/** | ||
- solvers/** | ||
- crates/** | ||
|
@@ -55,7 +55,7 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Disable rust-lld (to fix linkme) | ||
run: | | ||
run: | | ||
echo RUSTFLAGS=${RUSTFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | ||
echo RUSTDOCFLAGS=${RUSTDOCFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | ||
if: matrix.rust_release == 'nightly' | ||
|
@@ -65,10 +65,10 @@ jobs: | |
- run: cargo build -vv --workspace | ||
|
||
- uses: ./.github/actions/install-conjure | ||
with: | ||
with: | ||
os_arch: ${{ matrix.release_suffix }} | ||
version: ${{ matrix.conjure_version }} | ||
|
||
- run: cargo test --workspace | ||
|
||
audit: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/// Triggers a panic with a detailed bug report message, while ensuring the panic is ignored in coverage reports. | ||
/// | ||
/// This macro is useful in situations where an unreachable code path is hit or when a bug occurs. | ||
/// | ||
/// # Parameters | ||
/// | ||
/// - `msg`: A string expression describing the cause of the panic or bug. | ||
/// | ||
/// ``` | ||
#[macro_export] | ||
macro_rules! bug { | ||
($msg:expr $(, $arg:tt)*) => {{ | ||
let formatted_msg = format!($msg, $($arg)*); | ||
let full_message = format!( | ||
r#" | ||
This should never happen, sorry! | ||
However, it did happen, so it must be a bug. Please report it to us! | ||
Conjure Oxide is actively developed and maintained. We will get back to you as soon as possible. | ||
You can help us by providing a minimal failing example. | ||
Issue tracker: http://github.com/conjure-cp/conjure-oxide/issues | ||
{} | ||
"#, &formatted_msg); | ||
|
||
panic!("{}", full_message); | ||
}}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.