update CI

This commit is contained in:
Boog900 2024-01-22 22:30:19 +00:00
parent f894ff6f1b
commit 0662a125e1
No known key found for this signature in database
GPG key ID: 5401367FB7302004

View file

@ -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
- uses: actions/cache/restore@v3
id: cache-restore
with:
path: target
key: ${{ matrix.os }}
- name: Spawn monerod
uses: ./.github/actions/monerod-regtest
key: ubuntu-latest
- name: Install dependencies
run: sudo apt install -y libboost-dev
- name: Build
run: cargo build --all-features
- uses: actions/cache/save@v3
id: cache-save
with:
path: target
key: ubuntu-latest
lint:
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: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Fmt
run: cargo fmt --all --check
- name: Test
run: cargo test
tests:
runs-on: ubuntu-latest
needs: build
- name: Build
run: cargo 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