-
Notifications
You must be signed in to change notification settings - Fork 136
151 lines (148 loc) · 4.79 KB
/
ci.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Continuous integration
on:
push:
branches:
- master
- release/*
pull_request:
env:
RUSTFLAGS: -Dwarnings
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checking out fvm
uses: actions/checkout@v2
- name: Installing Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: minimal
override: true
components: rustfmt
- name: Running fmt
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: fmt
args: -- --check
cargo:
needs: [rustfmt]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
name: [build, check-clippy, test-fvm, test, integration, conformance]
include:
- name: build
key: v3
push: true
command: build
- name: check-clippy
key: v3
command: clippy
args: --all --all-targets
components: clippy
- name: test-fvm
key: v3-cov
push: true
covname: fvm-lcov.info
command: llvm-cov
args: --package fvm --no-default-features --lcov --output-path fvm-lcov.info
components: llvm-tools-preview
- name: test
key: v3-cov
covname: lcov.info
command: llvm-cov
args: --all --exclude fvm --exclude fvm_conformance_tests --exclude fvm_integration_tests --exclude "*actor" --lcov --output-path lcov.info
components: llvm-tools-preview
- name: integration
key: v3
command: test
args: --package fvm_integration_tests --package "*actor"
- name: conformance
key: v3
command: test
args: --package fvm_conformance_tests
submodules: true
# Overrides
# skip generating wasm coverage on mac
- os: macos-latest
name: integration
key: v3
command: test
args: --package fvm_integration_tests --package "*actor"
exclude:
- os: macos-latest
name: check-clippy
env:
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache
CACHE_SKIP_SAVE: ${{ matrix.push == '' || matrix.push == 'false' }}
CARGO_TERM_COLOR: always
name: ${{matrix.os}} - ${{ matrix.name }}
steps:
- name: Checking out fvm
uses: actions/checkout@v2
with:
submodules: ${{ matrix.submodules }}
- name: Installing Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: minimal
target: wasm32-unknown-unknown
override: true
components: ${{ matrix.components }}
# we don't check the lockfile in; this is needed for cache restoration/saving
- name: Generating Cargo.lock
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: generate-lockfile
- name: Installing Cargo llvm-cov
if: ${{ matrix.covname }}
uses: taiki-e/install-action@bc0a06a003a8225fe3e896c9ed3a4c3cc2e8416a
with:
tool: cargo-llvm-cov@0.4.5
- name: Setting up cache
uses: ./.github/actions/rust-sccache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: v0.2.15
platform: ${{ matrix.os }}
# change this to invalidate sccache for this job
shared-key: ${{ matrix.key }}
- name: Running ${{ matrix.command }}
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: ${{ matrix.command }}
args: ${{ matrix.args }}
- name: Upload coverage to Codecov
if: ${{ matrix.covname }}
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
with:
files: ${{ matrix.covname }}
fail_ci_if_error: true
- name: Installing Cargo-Cache
if: ${{ matrix.push }}
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: cargo-cache
- name: Cleaning Cargo Cache
if: ${{ matrix.push }}
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: cache
args: --autoclean
- name: Getting Cargo Cache Size
if: ${{ matrix.push }}
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: cache
args: -i
- name: Getting sccache size
if: ${{ matrix.push }}
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: cache
args: sccache