mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-01-03 17:39:50 +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
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -16,39 +14,61 @@ env:
|
||||||
RUST_MIN_STACK: 8000000
|
RUST_MIN_STACK: 8000000
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Cache
|
- uses: actions/cache/restore@v3
|
||||||
uses: actions/cache@v3
|
id: cache-restore
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ matrix.os }}
|
key: ubuntu-latest
|
||||||
|
|
||||||
- name: Spawn monerod
|
- name: Install dependencies
|
||||||
uses: ./.github/actions/monerod-regtest
|
run: sudo apt install -y libboost-dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Build
|
||||||
run: sudo apt install -y libboost-dev
|
run: cargo build --all-features
|
||||||
|
|
||||||
- name: Clippy
|
- uses: actions/cache/save@v3
|
||||||
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
id: cache-save
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ubuntu-latest
|
||||||
|
|
||||||
- name: Fmt
|
lint:
|
||||||
run: cargo fmt --all --check
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
|
||||||
- name: Test
|
steps:
|
||||||
run: cargo test
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build
|
- uses: actions/cache/restore@v3
|
||||||
run: cargo build
|
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