mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-22 19:49:33 +00:00
update CI
This commit is contained in:
parent
f894ff6f1b
commit
0662a125e1
1 changed files with 49 additions and 29 deletions
78
.github/workflows/ci.yml
vendored
78
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue