Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhuiluo committed Jul 20, 2024
1 parent bd0f731 commit 7aa119e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/default-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,40 @@ on:
cache-key:
description: "Cache key"
value: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache-dependency-path: "yarn.lock"
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies 📦
run: yarn install --frozen-lockfile
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache-dependency-path: "yarn.lock"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install dependencies 📦
run: yarn install --frozen-lockfile

- name: Generate contract Rust bindings
run: yarn bind
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Generate contract Rust bindings
run: yarn bind

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}

jobs:
setup:
uses: ./.github/workflows/default-setup.yml

lint:
name: Lint
needs: setup
Expand Down

0 comments on commit 7aa119e

Please sign in to comment.