-
-
Notifications
You must be signed in to change notification settings - Fork 13
113 lines (113 loc) · 3.2 KB
/
verify.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
name: code verification
on: [push]
jobs:
build-go:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: ARTIFACTS="sk-vnode sk-cloudprov" make build
verify-go:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Lint Go code
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
- name: Test
run: make test-go cover-go
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: go-coverage
path: .build/coverage/go-coverage.txt
build-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Build
run: ARTIFACTS="sk-ctrl sk-driver sk-tracer" make build
lint-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Lint Rust code
run: cargo clippy
test-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Install grcov
run: |
curl -LO https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2
tar -xjf grcov-x86_64-unknown-linux-gnu.tar.bz2
mv grcov /usr/local/bin
- name: Add llvm-tools
run: rustup component add llvm-tools-preview
- name: Test
run: make test-rust itest-rust cover-rust
env:
WITH_COVERAGE: "true"
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: rust-coverage
path: .build/coverage/rust-coverage.lcov
check-coverage:
runs-on: ubuntu-latest
needs:
- verify-go
- test-rust
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download coverage
uses: actions/download-artifact@v3
- name: Check coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}