-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 2.56 KB
/
ipld-resolver.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
80
81
82
83
84
85
86
87
88
name: IPLD Resolver CI
# This workflow is triggered from the main CI workflow.
on:
workflow_call:
jobs:
# Check code formatting; anything that doesn't require compilation.
pre-compile-checks:
name: Pre-compile checks
runs-on: ubuntu-latest
steps:
- name: Check out the project
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt
- name: Check code formatting
run: cd ipld/resolver && make check-fmt
# - name: Check diagrams
# run: make check-diagrams
# Test matrix, running tasks from the Makefile.
tests:
if: ${{ !github.event.pull_request.draft }}
needs: [ pre-compile-checks ]
name: ${{ matrix.make.name }} (${{ matrix.os }}, ${{ matrix.rust }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
rust: [ stable ]
make:
- name: Check clippy
task: check-clippy
- name: Test
task: test
env:
RUST_BACKTRACE: full
RUSTFLAGS: -Dwarnings
CARGO_INCREMENTAL: '0'
SCCACHE_CACHE_SIZE: 10G
CC: "sccache clang"
CXX: "sccache clang++"
steps:
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BUILTIN_ACTORS_DEPLOY_KEY }}
- name: Check out the project
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Tools
uses: ./.github/actions/install-tools
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
rust: ${{ matrix.rust }}
- name: Setup Cache
uses: ./.github/actions/setup-cache
timeout-minutes: 5
continue-on-error: true
with:
# Caching everything separately, in case they don't ask for the same things to be compiled.
cache-prefix: ipld-resolver-${{ matrix.make.name }}-${{ matrix.os }}-${{ matrix.rust }}-${{ hashFiles('rust-toolchain', 'rust-toolchain.toml') }}
cache-suffix: ${{ hashFiles('**/Cargo.lock') }}
- name: Cache Solidity ABI artifacts
uses: actions/cache@v2
with:
path: ./contracts/out
key: contracts-abi-${{ hashFiles('./contracts/src/**/*.sol') }}
- name: Generate Solidity ABI artifacts
run: >-
[ -d contracts/out ] || (cd contracts && make compile-abi)
- name: ${{ matrix.make.name }}
run: cd ipld/resolver && make ${{ matrix.make.task }}