forked from 0LNetworkCommunity/libra-legacy-v6
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ci.yaml
153 lines (150 loc) · 4.79 KB
/
ci.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
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
152
153
name: CI
on:
push:
branches: [ main, ci ]
pull_request:
branches: [ main, 'release**' ]
jobs:
functional:
name: Functional Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
./target_test
key: ${{ runner.os }}-cache2-func-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: 1.46.0
override: true
components: rustfmt, clippy
- name: Install deps
run: sudo apt-get install -y lld
- name: check version
run: rustc -V
- name: Build stdlib
run: cd language/stdlib && cargo run --release
- name: Run 0L functional tests
run: cd language/move-lang/functional-tests && NODE_ENV=test cargo test 0L
tools:
name: 0L tools Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
./target_test
key: ${{ runner.os }}-cache2-miner-${{ hashFiles('**/Cargo.lock') }}
- name: Install deps
run: sudo apt-get install -y lld
- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: 1.46.0
override: true
components: rustfmt, clippy
- name: Run Miner tests
run: cd ol/miner && NODE_ENV=test cargo test
- name: Run Types tests
run: cd ol/types && NODE_ENV=test cargo test
- name: Run TXS tests
run: cd ol/txs && NODE_ENV=test cargo test
- name: Run keygen tests
run: cd ol/keys && NODE_ENV=test cargo test
e2e:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
./target_test
key: ${{ runner.os }}-cache2-miner-${{ hashFiles('**/Cargo.lock') }}
- name: Install deps
run: sudo apt-get install -y lld
- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: 1.46.0
override: true
components: rustfmt, clippy
- name: Build stdlib
run: cd language/stdlib && cargo run --release
- name: Run 0L e2e tests
run: cd language/e2e-testsuite && NODE_ENV=test cargo test ol
# genesis_smoke:
# name: Genesis Smoke Test
# runs-on: ubuntu-latest
# # needs: compile
# steps:
# - uses: actions/checkout@v2
# # Uses the cache done in the parent job (compile) with the same "key"
# - uses: actions/[email protected]
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-test-genesis-smoke-${{ hashFiles('**/Cargo.lock') }}
# - name: Run smoke test
# run: cargo xtest -p libra-management smoke_test
# swarm_acceptance:
# name: Swarm Acceptance Test
# runs-on: ubuntu-latest
# # needs: compile
# steps:
# - uses: actions/checkout@v2
# # Uses the cache done in the parent job (compile) with the same "key"
# - uses: actions/[email protected]
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-test-swarm-${{ hashFiles('**/Cargo.lock') }}
# - name: Start swarm & grep logs
# run: chmod +x 0L_swarm_test.sh && ./0L_swarm_test.sh
#
# compile:
# name: Compile and Cache
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# # Sets up a cache to be used on other subsequent jobs.
# # subsequent jobs must use the "needs" field and reference this job.id "compile".
# - uses: actions/[email protected]
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# # A cache "key" is created from a hash of the cargo.lock.
# key: ${{ runner.os }}-test-compile-${{ hashFiles('**/Cargo.lock') }}
#
# - name: Install latest nightly
# uses: actions-rs/[email protected]
# with:
# toolchain: nightly
# override: true
# components: rustfmt, clippy
#
# # Note: build all binaries is too heavy for testing the CI flow.
# # implement when caching is consistent.
# - name: Build stdlib
# run: cd language/stdlib && cargo run --release
# - name: Build all binaries
# run: cargo build --all --bins --exclude cluster-test