Skip to content

Commit

Permalink
Merge pull request #48 from ergoplatform/cache-rust-in-cicd
Browse files Browse the repository at this point in the history
Add rust/cargo caching in ci/cd
  • Loading branch information
ross-weir authored May 20, 2023
2 parents c79a7e8 + 216d49d commit 85ab43e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,26 @@ on:
- main

jobs:
lint:
name: Lint
test-and-lint:
name: Unit Test and Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
override: true
toolchain: stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rustfmt
uses: actions-rs/cargo@v1
with:
Expand All @@ -25,17 +36,8 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-pack
run: cargo install wasm-pack
run: cargo install wasm-pack || true # exits with a error code if wasm-pack is already installed
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Setup Node.js 16.x
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ The following functionality has been migrated:
| Addresses | ✅
| ErgoTree | ✅

### authenticated-avl-tree

Low level AVL+ tree library for interacting with trees off-chain.

### scorex-buffer

Cursor buffers implementing ZigZag/VLQ encoding as used for serialization on Ergo.

### Internal Crates

This repository contains a few utility crates that are used throughout the repository but are not published.
Expand Down

0 comments on commit 85ab43e

Please sign in to comment.