From 39b029f3e7642d94392239992c4af8b39377c7b6 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Wed, 25 Oct 2023 20:39:57 -0400 Subject: [PATCH] add CI actions --- .github/workflows/audit.yml | 33 +++++++++++++++++++++++++++ .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/rust.yml | 22 ------------------ README.md | 2 +- 4 files changed, 79 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/audit.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 00000000..6423784e --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,33 @@ +# This runs `cargo audit` on all dependencies (only if Cargo deps changed) + +name: Audit + +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + +env: + CARGO_TERM_COLOR: always + +jobs: + audit: + + runs-on: ubuntu-latest + + steps: + - name: Cache + uses: actions/cache@v3.2.3 + with: + path: | + ~/.cargo + target + key: audit + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install dependencies + run: cargo install cargo-audit + - name: Audit + run: cargo audit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0ec4eeb4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +# This [clippys, tests, builds] on [windows, macos, linux] + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + # Show full panics. + RUST_BACKTRACE: "full" + # Increase thread stack size to 8 megabytes. + RUST_MIN_STACK: 8000000 + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-2019, macos-11, ubuntu-20.04] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Cache + uses: actions/cache@v3 + with: + path: target + key: ${{ matrix.os }} + + - name: Clippy + run: cargo clippy + + - name: Test + run: cargo test + + - name: Build + run: cargo build diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 31000a27..00000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/README.md b/README.md index ffe2f3f7..c38a1288 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ > An up and coming Rust Monero node. -[![Matrix](https://img.shields.io/badge/Matrix-Cuprate-white?logo=matrix&labelColor=grey&logoColor=white)](https://matrix.to/#/#cuprate:monero.social) +[![Matrix](https://img.shields.io/badge/Matrix-Cuprate-white?logo=matrix&labelColor=grey&logoColor=white)](https://matrix.to/#/#cuprate:monero.social) [![CI](https://github.com/Cuprate/cuprate/actions/workflows/ci.yml/badge.svg)](https://github.com/Cuprate/cuprate/actions/workflows/ci.yml) Cuprate will be an alternative Monero node written from the ground up in Rust. It will be able to independently validate Monero consensus rules providing a layer of