Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements to CI #25

Merged
merged 2 commits into from
Oct 23, 2024
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
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:

- uses: actions/checkout@v4

- name: Format check
run: cargo fmt --all -- --check
- name: Clippy check
run: cargo clippy --all --all-targets --all-features -- -D warnings

# breaks for now since Cargo.lock is in a new version (4)
# - uses: actions-rs/audit-check@v1
# with:
Expand All @@ -52,7 +57,7 @@ jobs:
RUSTC_WRAPPER: "sccache"

# afterwards, upload the report to codecov
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
Expand Down
4 changes: 0 additions & 4 deletions plastic_core/src/cartridge/mappers/mapper10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ pub struct Mapper10 {
/// +- Nametable mirroring (0: vertical; 1: horizontal)
mirroring_vertical: bool,

/// ($C000-$DFFE, even)
/// the value to reload `irq_counter` when it reaches zero or when asked
/// to be reloaded from `($C001-$DFFF, odd)`
/// is using CHR RAM?
is_chr_ram: bool,

Expand Down
4 changes: 0 additions & 4 deletions plastic_core/src/cartridge/mappers/mapper9.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ pub struct Mapper9 {
/// +- Nametable mirroring (0: vertical; 1: horizontal)
mirroring_vertical: bool,

/// ($C000-$DFFE, even)
/// the value to reload `irq_counter` when it reaches zero or when asked
/// to be reloaded from `($C001-$DFFF, odd)`
/// is using CHR RAM?
is_chr_ram: bool,

Expand Down
2 changes: 1 addition & 1 deletion plastic_core/src/cpu6502/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ struct WrapperReader<'a, R: Read> {
pub inner: &'a mut R,
}

impl<'a, R: Read> Read for WrapperReader<'a, R> {
impl<R: Read> Read for WrapperReader<'_, R> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
self.inner.read(buf)
}
Expand Down
6 changes: 6 additions & 0 deletions plastic_core/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
sum: f64,
}

impl Default for MovingAverage {
fn default() -> Self {
Self::new()
}

Check warning on line 14 in plastic_core/src/misc.rs

View check run for this annotation

Codecov / codecov/patch

plastic_core/src/misc.rs#L12-L14

Added lines #L12 - L14 were not covered by tests
}

impl MovingAverage {
pub fn new() -> Self {
Self {
Expand Down
3 changes: 1 addition & 2 deletions plastic_core/src/ppu2c02/sprite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ impl Sprite {

/// for 8x8:
/// use the byte normally as index into the pattern table
///
/// for 8x16:
/// 76543210
/// ||||||||
/// |||||||+- Bank ($0000 or $1000) of tiles
Expand Down
Loading