forked from witnet/witnet-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (77 loc) · 2.6 KB
/
push.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
name: Check on every push
on: [push, pull_request]
jobs:
build_ubuntu:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
CLIPPY_LINTS: >-
-D warnings
-D clippy::cast-lossless
-D clippy::cast-possible-truncation
-D clippy::cast-possible-wrap
-D clippy::cast-precision-loss
-D clippy::cast-sign-loss
-D clippy::checked-conversions
-A clippy::upper-case-acronyms
-A clippy::uninlined-format-args
ROCKSDB_INCLUDE_DIR: /usr/local/include
ROCKSDB_LIB_DIR: /usr/local/lib
LD_LIBRARY_PATH: /usr/local/lib
steps:
- uses: actions/checkout@v1
# Ensure some subcrate versions match that of the main crate
- uses: ./.github/actions/versions-match
name: Checking version of node
with:
subcrate: node
- uses: ./.github/actions/versions-match
name: Checking version of wallet
with:
subcrate: wallet
- uses: ./.github/actions/versions-match
name: Checking version of toolkit
with:
subcrate: toolkit
- uses: ./.github/actions/versions-match
name: Checking version of data_structures
with:
subcrate: data_structures
- uses: ./.github/actions/versions-match
name: Checking version of bridges/centralized-ethereum
with:
subcrate: bridges/centralized-ethereum
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: rustfmt, clippy
- name: Formatter
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Install compilation system dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y g++-9 cmake libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev protobuf-compiler
- name: Compile and install RocksDB
run: |
git clone https://github.com/facebook/rocksdb.git
cd rocksdb
git checkout v8.1.1
make shared_lib
sudo make install-shared
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-targets --all-features -- ${{ env.CLIPPY_LINTS }} -A clippy::many-single-char-names
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --verbose
# This is used to ensure that Cargo.lock is up to date
- name: Check for unstaged files
run: git diff --exit-code