Skip to content

Commit

Permalink
ci: improve performance
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Jun 9, 2023
1 parent 49e6402 commit 4154fe3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,36 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- uses: datachainlab/rust-cache@allow_registry_src_caching
with:
workspaces: |
.
./enclave
- uses: actions-rs/cargo@v1
- run: make lint-tools
cache-directories: |
~/.cargo/registry/src/**/librocksdb-sys-*
- run: make lint

udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: datachainlab/rust-cache@allow_registry_src_caching
with:
workspaces: |
.
./enclave
cache-directories: |
~/.cargo/registry/src/**/librocksdb-sys-*
- run: make udeps-tools
- run: make udeps

relayer:
runs-on: ubuntu-latest
steps:
Expand All @@ -41,12 +58,13 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- uses: datachainlab/rust-cache@allow_registry_src_caching
with:
workspaces: |
.
./enclave
- uses: actions-rs/cargo@v1
cache-directories: |
~/.cargo/registry/src/**/librocksdb-sys-*
- run: |
docker run -w /root/lcp \
-v $(pwd):/root/lcp \
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,17 @@ proto:
fmt:
@cargo fmt --all && cd ./enclave && cargo fmt --all

.PHONY: lint-tools
lint-tools:
cargo +nightly install cargo-udeps --locked

.PHONY: lint
lint:
@cargo check --locked --tests $(CARGO_TARGET)
@cargo +nightly udeps --locked --lib --tests --quiet $(CARGO_TARGET)

.PHONY: udeps-tools
udeps-tools:
cargo +nightly install cargo-udeps --locked

.PHONY: udeps
udeps:
@cargo +nightly udeps --locked --lib --tests $(CARGO_TARGET)

######## Tools ########

Expand Down

0 comments on commit 4154fe3

Please sign in to comment.