-
Notifications
You must be signed in to change notification settings - Fork 16
79 lines (73 loc) · 2.22 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Messari Substreams Build
on:
pull_request:
push:
branches:
- master
jobs:
validate-params:
name: ValidateSubstreamsParams
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('./scripts/package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: cd scripts && npm ci --ignore-scripts
- name: Validate Substreams Params Schema
run: cd scripts && npm run validate:params
- name: Validate Subgraph Deployments
run: cd scripts && npm run validate:subgraphs
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: install substreams cli
uses: jaxxstorm/[email protected]
with:
repo: streamingfast/substreams
tag: v1.0.1
cache: enable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: install buf
uses: bufbuild/[email protected]
- name: install rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy
- name: run cargo fmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: used cached Rust build artifacts
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-cli
run: make install-cli
- name: build all
run: |
chmod a+x /opt/hostedtoolcache/streamingfast/substreams/v1.0.1/linux-x64/substreams
export PATH="/opt/hostedtoolcache/streamingfast/substreams/v1.0.1/linux-x64/:$PATH"
make build-all