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

Dependabot cleanup and fixup CI #6

Merged
merged 17 commits into from
Jun 5, 2023
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
18 changes: 0 additions & 18 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=lld"]

# NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager:
# `brew install michaeleisel/zld/zld`
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld"]

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/bin/zld"]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"

[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"

[target.'cfg(all())']
rustflags = [
"-Wclippy::pedantic",
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ updates:
directory: /
schedule:
interval: daily
ignore:
- dependency-name: "*"
#ignore:
# - dependency-name: "*"
# patch and minor updates don't matter for libraries
# remove this ignore rule if your package has binaries
update-types:
- "version-update:semver-patch"
- "version-update:semver-minor"
# update-types:
# - "version-update:semver-patch"
# - "version-update:semver-minor"
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: [1.56.1] # 2021 edition requires 1.56
msrv: [1.65] # let/else support
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v3
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/nostd.yml

This file was deleted.

45 changes: 29 additions & 16 deletions .github/workflows/safety.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
if: always()
run: cargo test --all-features --target x86_64-unknown-linux-gnu
env:
LSAN_OPTIONS: "suppressions=lsan-suppressions.txt"
LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan-suppressions.txt"
RUSTFLAGS: "-Z sanitizer=leak"
miri:
runs-on: ubuntu-latest
Expand All @@ -59,20 +59,33 @@ jobs:
with:
toolchain: ${{ env.NIGHTLY }}
components: miri
- name: cargo miri test
run: cargo miri test
- name: cargo miri test c64basic
run: cargo miri test -p c64basic
env:
MIRIFLAGS: ""
loom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo test --test loom
run: cargo test --release --test loom
# Disable isolation as we load external input files/images.
MIRIFLAGS: "-Zmiri-disable-isolation"
- name: cargo miri test cpu
run: |
# Only test a subset and do them in separate runs or miri OOMs
for i in init_tests irq_and_nmi load_tests store_tests nop_hlt_tests::classic_nop_0x02_hlt rom_tests::undocumented_opcodes_test; do
echo Testing $i
cargo miri test -p cpu $i
done
env:
LOOM_MAX_PREEMPTIONS: 2
RUSTFLAGS: "--cfg loom"
# Ignore leaks - cpu test does this on purpose.
# Disable isolation as we load external input files/images.
# Stacked borrows because eyre doesn't work.
MIRIFLAGS: "-Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-disable-stacked-borrows"
#loom:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Install stable
# uses: dtolnay/rust-toolchain@stable
# - name: cargo test --test loom
# run: cargo test --release --test loom
# env:
# LOOM_MAX_PREEMPTIONS: 2
# RUSTFLAGS: "--cfg loom"
10 changes: 2 additions & 8 deletions cpu/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@ macro_rules! init_test {
let mut cpu = setup($type, 0x1212, 0xEA, None, None, None, None);

// This should fail
{
let ret = cpu.reset();
assert!(ret.is_err(), "reset worked before power_on");
}
assert!(cpu.reset().is_err(), "reset worked before power_on");

// Now it should work.
cpu.power_on()?;
Expand All @@ -197,10 +194,7 @@ macro_rules! init_test {
}

// This should fail now.
{
let ret = cpu.power_on();
assert!(ret.is_err(), "power_on passes twice");
}
assert!(cpu.power_on().is_err(), "power_on passes twice");
}
if $rand {
assert!(track.len() == 2, "didn't get both decimal states");
Expand Down
2 changes: 2 additions & 0 deletions lsan-suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These tests are intended to leak some top level objects
leak:cpu::tests::