-
Notifications
You must be signed in to change notification settings - Fork 0
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
[MTG-237] ci cd #17
[MTG-237] ci cd #17
Changes from 7 commits
28ab8bd
7ee796f
e056d6c
5526d71
0eff05e
dfe3663
7e759c1
232fbd3
7257b0e
730d034
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[advisories] | ||
ignore = ["RUSTSEC-2024-0344", "RUSTSEC-2022-0093"] # ignore unfixable vulnerabilities | ||
|
||
[output] | ||
deny = [] # exit on error if unmaintained dependencies are found | ||
format = "terminal" # "terminal" (human-readable report) or "json" | ||
quiet = true # Only print information on error | ||
show_tree = false # Show inverse dependency trees along with advisories (default: true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a newline everywhere (you might want to do this as a default setting on a file save, just like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not showing the tree? it might be helpful to understand what should we update? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As for me it was very noisy, so I thought it would be nice to remove this tree. But if you think different I will change it. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Cargo Audit | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our main branch is |
||
pull_request: | ||
|
||
# Allowing manual runs with ability to choose branch | ||
workflow_dispatch: | ||
|
||
# Optimisation option by targeting direct paths to only scan when there are changes to dependencies in the push/PR | ||
# push: | ||
# paths: | ||
# - 'Cargo.toml' | ||
# - 'Cargo.lock' | ||
# pull_request: | ||
# paths: | ||
# - 'Cargo.toml' | ||
# - 'Cargo.lock' | ||
|
||
# Example of running scheduled scans at 6AM UTC every Monday to regularly check for vulnerable dependencies | ||
# schedule: | ||
# - cron: '0 6 * * 1' | ||
|
||
jobs: | ||
Cargo-audit: | ||
name: Cargo Vulnerability Scanner | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Cargo Audit | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-audit | ||
version: latest | ||
|
||
- name: Run Cargo Audit | ||
run: cargo audit -c always |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Lint and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SOLANA_VERSION: "1.18.9" | ||
RUST_TOOLCHAIN: "1.78.0" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
|
||
jobs: | ||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust nightly | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
components: rustfmt, clippy | ||
cache: true | ||
|
||
- name: Run fmt | ||
run: cargo fmt -- --check | ||
|
||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Linux dependencies | ||
run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev | ||
|
||
- name: Install Rust nightly | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
cache: true | ||
|
||
- name: Cache Solana binaries | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/solana | ||
key: ${{ runner.os }}-${{ env.RUST_TOOLCHAIN }} | ||
|
||
- name: Install Solana | ||
run: | | ||
sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" | ||
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH" | ||
solana --version | ||
echo "Generating keypair..." | ||
solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent | ||
|
||
- name: Switch toolchain | ||
run: | | ||
rustup override set ${{ env.RUST_TOOLCHAIN }} | ||
solana-install init ${{ env.SOLANA_VERSION }} | ||
|
||
- name: Run tests | ||
run: cargo test-bpf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an error, but why those two specifically?
Nvm, I have seen a comment. Why are they unfixable though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also curious.
Probably that's because of
solana-ed25519-dalek
dependency in solana itself. The fix in the library had been merged 3 weeks ago, so I assume the issue should gone soon in the next versions.