diff --git a/.github/workflows/benches.yml b/.github/workflows/benches.yml new file mode 100644 index 0000000000..118a176540 --- /dev/null +++ b/.github/workflows/benches.yml @@ -0,0 +1,23 @@ +name: Benches + +on: + pull_request: + paths: + - ".github/workflows/benches.yml" + - "benches/**" + +jobs: + benches: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + components: clippy, rustfmt + - name: Rustfmt + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all --all-targets -- -D warnings + - name: Build + run: RUSTFLAGS=-Dwarnings cargo build --all-targets diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml new file mode 100644 index 0000000000..ef92b7f479 --- /dev/null +++ b/.github/workflows/workspace.yml @@ -0,0 +1,33 @@ +name: Workspace + +on: + pull_request: + paths-ignore: + - README.md + - "benches/**" + push: + branches: master + paths-ignore: + - README.md + - "benches/**" + +jobs: + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.78.0 + components: clippy + - run: cargo clippy --all --all-targets -- -D warnings + + rustfmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + - run: cargo fmt --all -- --check diff --git a/Cargo.toml b/Cargo.toml index 8ffdff7819..a2ea562a28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,12 +58,12 @@ unbiased = [] [workspace] members = [ - "benches", "rand_core", "rand_distr", "rand_chacha", "rand_pcg", ] +exclude = ["benches"] [dependencies] rand_core = { path = "rand_core", version = "=0.9.0-alpha.1", default-features = false }