-
Notifications
You must be signed in to change notification settings - Fork 102
43 lines (40 loc) · 1.52 KB
/
build-cache.yml
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
name: Generate rust cache for PR builds
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain 1.81 (with clippy and rustfmt)
run: rustup toolchain install 1.81-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.81-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.81-x86_64-unknown-linux-gnu
- name: Install EStarkPolygon prover dependencies
run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm
- name: Lint
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings
- name: Lint
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings
- name: Format
run: cargo fmt --all --check --verbose
- name: Build
run: cargo build --all-targets --all --all-features --profile pr-tests
- name: Check without Halo2
run: cargo check --all --no-default-features --profile pr-tests
- name: Save date of cache build
run: date -R -u > target/cache-build-date.txt
- name: ⚡ Save rust cache
uses: WarpBuilds/cache/save@v1
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
Cargo.lock
key: ${{ runner.os }}-cargo-pr-tests