From 0662a125e1a17b3b8a98baa6281023cb8e24289d Mon Sep 17 00:00:00 2001 From: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com> Date: Mon, 22 Jan 2024 22:30:19 +0000 Subject: [PATCH] update CI --- .github/workflows/ci.yml | 78 +++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e0bdfd..6d2afc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,3 @@ -# This [clippys, tests, builds] on [windows, macos, linux] - name: CI on: @@ -16,39 +14,61 @@ env: RUST_MIN_STACK: 8000000 jobs: - ci: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] + build: + runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive + - uses: actions/checkout@v3 - - name: Cache - uses: actions/cache@v3 - with: - path: target - key: ${{ matrix.os }} + - uses: actions/cache/restore@v3 + id: cache-restore + with: + path: target + key: ubuntu-latest - - name: Spawn monerod - uses: ./.github/actions/monerod-regtest + - name: Install dependencies + run: sudo apt install -y libboost-dev - - name: Install dependencies - run: sudo apt install -y libboost-dev + - name: Build + run: cargo build --all-features - - name: Clippy - run: cargo clippy --workspace --all-targets --all-features -- -D warnings + - uses: actions/cache/save@v3 + id: cache-save + with: + path: target + key: ubuntu-latest - - name: Fmt - run: cargo fmt --all --check + lint: + runs-on: ubuntu-latest + needs: build - - name: Test - run: cargo test + steps: + - uses: actions/checkout@v3 - - name: Build - run: cargo build + - uses: actions/cache/restore@v3 + id: cache + with: + path: target + key: ubuntu-latest + + - name: Clippy + run: cargo clippy --workspace --all-targets --all-features -- -D warnings + + - name: Fmt + run: cargo fmt --all --check + + tests: + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache/restore@v3 + id: cache + with: + path: target + key: ubuntu-latest + + - name: Test + run: cargo test --all-features --workspace --all-targets && cargo test --all-features --workspace --doc