-
Notifications
You must be signed in to change notification settings - Fork 154
148 lines (144 loc) · 5.69 KB
/
Copy pathci.yml
File metadata and controls
148 lines (144 loc) · 5.69 KB
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
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@v4
- name: Check Format
run: cargo fmt -- --check
- name: Check license headers
run: make license
cargo:
needs: [rustfmt]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
name: [build, check-m2-native, check-clippy, check-clippy-verify-signature, test-fvm, test, integration, conformance, calibration, doctest, doc]
include:
- name: build
key: v3
push: true
# we disable default features because rust will otherwise unify them and turn on opencl in CI.
command: build
args: --no-default-features
- name: check-m2-native
key: v3
push: true
command: check
# we disable default features because rust will otherwise unify them and turn on opencl in CI.
args: --features=m2-native --no-default-features
- name: check-clippy
key: v3
command: clippy
# we disable default features because rust will otherwise unify them and turn on opencl in CI.
args: --all --all-targets --no-default-features
- name: check-clippy-verify-signature
key: v3
command: clippy
# we disable default features because rust will otherwise unify them and turn on opencl in CI.
args: --all --all-targets --no-default-features --features verify-signature
- 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
- 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
- name: integration
key: v3-cov
covname: itest-lcov.info
command: llvm-cov
args: --package fvm_integration_tests --package "*actor" --lcov --output-path itest-lcov.info
- name: conformance
key: v3
command: test
args: --package fvm_conformance_tests
submodules: true
- name: calibration
key: v3
command: test
# we disable default features because rust will otherwise unify them and turn on opencl in CI.
args: --release --test gas_calibration_test --features calibration --no-default-features
- name: doctest
key: v3
command: test
# we disable default features because Rust will otherwise unify them and turn on opencl in CI.
# we also disable test packages, given they are unlikely to contain any doctests and would double the compilation duration
args: --all --no-default-features --exclude fvm_conformance_tests --exclude fvm_integration_tests --exclude "*actor" --doc
- name: doc
key: v3
command: doc
args: --all --no-default-features --exclude fvm_conformance_tests --exclude fvm_integration_tests --exclude "*actor"
exclude:
- os: macos-latest
name: check-m2-native
- os: macos-latest
name: check-clippy
- os: macos-latest
name: conformance
- os: macos-latest
name: test
- os: macos-latest
name: test-fvm
- os: macos-latest
name: calibration
- os: macos-latest
name: doctest
- os: macos-latest
name: doc
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"
name: ${{matrix.os}} - ${{ matrix.name }}
steps:
- name: Checking out fvm
uses: actions/checkout@v4
with:
submodules: ${{ matrix.submodules }}
# we don't check the lockfile in; this is needed for cache restoration/saving
- name: Installing Cargo llvm-cov
if: ${{ matrix.covname }}
uses: taiki-e/install-action@f1390fd0d8205ae79e5e57b1d1e300dceeb4163e
with:
tool: cargo-llvm-cov@0.6.16
# Install clang for MacOS tests due to Apple's Clang not supporting `wasm32-unknown-unknown` target.
- name: Install clang for MacOS
if: ${{ matrix.os == 'macos-latest' && ( matrix.name == 'check-clippy-verify-signature' || matrix.name == 'integration' ) }}
run: |
brew install llvm
echo "$(brew --prefix llvm)/bin" >> "$GITHUB_PATH"
echo "CC=$(brew --prefix llvm)/bin/clang" >> "$GITHUB_ENV"
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> "$GITHUB_ENV"
- name: Setting up cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
with:
save-if: ${{ matrix.push == true }}
# change this to invalidate sccache for this job
prefix-key: ${{ matrix.key }}
- name: Running ${{ matrix.command }}
run: cargo ${{ matrix.command }} --locked ${{ matrix.args }}
- name: Upload coverage to Codecov
if: ${{ matrix.covname }}
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574
with:
files: ${{ matrix.covname }}
token: ${{ secrets.CODECOV_TOKEN }}
# Codecov is flaky and will randomly fail. We'd rather not have random failures on master.
fail_ci_if_error: false
verbose: true