Skip to content

Commit

Permalink
implement lazy SMP
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocodutra committed Jan 25, 2025
1 parent 23ea1cf commit e7544ea
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 229 deletions.
4 changes: 0 additions & 4 deletions .cargo/audit.toml

This file was deleted.

32 changes: 11 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cargo clippy --all-targets --all-features -- -D warnings

audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cargo install --force cargo-audit
- run: cargo generate-lockfile
- run: cargo audit

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo check --all-targets --all-features --workspace

doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo doc --all-features --workspace --no-deps

Expand All @@ -53,7 +53,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --all-targets --all-features --workspace

Expand All @@ -65,24 +65,23 @@ jobs:
matrix:
sanitizer: [address, leak, memory, thread]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cargo test --tests --all-features --workspace --target x86_64-unknown-linux-gnu -Zbuild-std -Zunstable-options --config='build.rustflags = ["-Zsanitizer=${{ matrix.sanitizer }}"]' -- --test-threads=1
env:
CC: "clang"
CFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
TSAN_OPTIONS: "suppressions=tsan"

coverage:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo install --force cargo-llvm-cov
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
env:
PROPTEST_CASES: 32
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
files: lcov.info
Expand All @@ -95,16 +94,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macOS-latest
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v3
- run: sudo apt install -y musl-tools
if: runner.os == 'Linux'
- uses: actions/checkout@v4
- run: cargo install --force cargo-make
- run: cargo make cinder
47 changes: 0 additions & 47 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ futures = { version = "0.3.31", default-features = false, features = [
] }
rand = { version = "0.8.5", default-features = false, features = ["std", "min_const_gen"] }
rand_pcg = { version = "0.3.1", default-features = false }
rayon = { version = "1.10.0", default-features = false }
ruzstd = { version = "0.8.0", default-features = false, features = ["std"] }

[dev-dependencies]
criterion = { version = "0.5.1", default-features = false, features = ["rayon"] }
criterion = { version = "0.5.1", default-features = false }
criterion-macro = { version = "0.4.0", default-features = false }
proptest = { version = "1.6.0", default-features = false, features = ["std"] }
test-strategy = { version = "0.4.0", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions lib/search.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mod control;
mod depth;
mod driver;
mod engine;
mod history;
mod killers;
Expand All @@ -13,7 +12,6 @@ mod transposition;

pub use control::*;
pub use depth::*;
pub use driver::*;
pub use engine::*;
pub use history::*;
pub use killers::*;
Expand Down
2 changes: 1 addition & 1 deletion lib/search/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct Interrupted;
pub enum Control<'a> {
#[default]
Unlimited,
Limited(Counter, Timer, &'a Trigger),
Limited(&'a Counter, &'a Timer, &'a Trigger),
}

impl Control<'_> {
Expand Down
109 changes: 0 additions & 109 deletions lib/search/driver.rs

This file was deleted.

Loading

0 comments on commit e7544ea

Please sign in to comment.