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

Workaround make audit failure for rust-nix #2697

Closed
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
47 changes: 35 additions & 12 deletions Cargo.lock

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

15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,20 @@ build-release-tarballs:
# Runs the full workspace tests in **release**, without downloading any additional
# test vectors.
test-release:
cargo test --workspace --release --exclude ef_tests --exclude beacon_chain
ifeq ($(OS),Windows_NT)
cargo test --workspace --release --exclude ef_tests --exclude beacon_chain --exclude psutil
else
cargo test --workspace --release --exclude ef_tests --exclude beacon_chain --exclude psutil
endif

# Runs the full workspace tests in **debug**, without downloading any additional test
# vectors.
test-debug:
cargo test --workspace --exclude ef_tests --exclude beacon_chain
ifeq ($(OS),Windows_NT)
cargo test --workspace --exclude ef_tests --exclude beacon_chain --exclude psutil
else
cargo test --workspace --exclude ef_tests --exclude beacon_chain --exclude psutil
endif

# Runs cargo-fmt (linter).
cargo-fmt:
Expand Down Expand Up @@ -134,7 +142,8 @@ lint:
-D warnings \
-A clippy::from-over-into \
-A clippy::upper-case-acronyms \
-A clippy::vec-init-then-push
-A clippy::vec-init-then-push \
-A clippy::needless_borrow

# Runs the makefile in the `ef_tests` repo.
#
Expand Down
3 changes: 2 additions & 1 deletion common/eth2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ futures = "0.3.8"
store = { path = "../../beacon_node/store", optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
psutil = { version = "3.2.0", optional = true }
#psutil = { version = "3.2.0", optional = true }
psutil = { path = "../../common/rust-psutil", optional = true }
procinfo = { version = "0.4.2", optional = true }

[features]
Expand Down
21 changes: 21 additions & 0 deletions common/rust-psutil/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

[*.{js,jsx,ts,tsx,html,php,vim,toml,yml,json}]
indent_size = 2

[*.yml]
indent_style = space

[Makefile,*.go]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
19 changes: 19 additions & 0 deletions common/rust-psutil/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug report
about: Template to report bugs.
---

<!--
Before opening an issue, make sure to:
- search existing issues to avoid creating duplicates
- test using the latest release to make sure your issue has not already been fixed
-->

Please provide any of the following information if relevant:

- rust-psutil version:
- target platform info
- kernel version:
- architecture:
- (if linux) distro:
- any relevant hardware info:
4 changes: 4 additions & 0 deletions common/rust-psutil/.github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
name: Other
about: No template.
---
87 changes: 87 additions & 0 deletions common/rust-psutil/.github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md

name: Rust CI

on: [push, pull_request]

jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check

test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

format:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
14 changes: 14 additions & 0 deletions common/rust-psutil/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Compiled files
*.o
*.so
*.rlib
*.dll

# Executables
*.exe

# Generated by Cargo
/target/

# This is a library
Cargo.lock
1 change: 1 addition & 0 deletions common/rust-psutil/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hard_tabs = true
Loading