-
Notifications
You must be signed in to change notification settings - Fork 13
147 lines (122 loc) · 3.8 KB
/
check.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
name: Tests
on:
pull_request:
branches:
- develop
workflow_dispatch:
env:
DEV_PACKAGES: build-essential musl musl-dev musl-tools pkg-config libssl-dev librust-openssl-sys-dev libc6 clang
ETH1_INFURA_API_KEY: ${{ secrets.ETH1_INFURA_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
jobs:
macos-check:
name: macOS Check
runs-on: macos-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-macos-latest-${{ matrix.target }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust"
- name: Build Checking on ${{ matrix.target }}
run: cargo check --target=${{ matrix.target }} --features native-tls/vendored --locked
strategy:
fail-fast: true
matrix:
target:
- x86_64-apple-darwin
macos-unit-tests:
name: macOS Unit Tests
runs-on: macos-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-macos-unit-tests-${{ matrix.target }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust"
- name: Testing on ${{ matrix.target }}
run: cargo test --target=${{ matrix.target }} --locked
strategy:
fail-fast: true
matrix:
target:
- x86_64-apple-darwin
linux-check:
name: Linux Check
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-linux-check-${{ matrix.target }}
cancel-in-progress: true
steps:
- name: install system build dependencies
run: sudo apt-get update && sudo apt-get install ${DEV_PACKAGES}
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install cross
run: cargo install cross --locked
- name: Build Checking on ${{ matrix.target }} using cross
run: cross check --target=${{ matrix.target }} --features native-tls/vendored --locked
strategy:
fail-fast: true
matrix:
target:
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
linux-unit-tests:
name: Linux Unit Tests
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-linux-unit-tests-${{ matrix.target }}
cancel-in-progress: true
steps:
- name: install system build dependencies
run: sudo apt-get update && sudo apt-get install ${DEV_PACKAGES}
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust"
- name: Create Env file
run: |
touch .env
echo ETH1_INFURA_API_KEY = ${{ secrets.ETH1_INFURA_API_KEY }} >> .env
- name: Testing on ${{ matrix.target }}
run: cargo test --target=${{ matrix.target }} --features native-tls/vendored --locked
strategy:
fail-fast: true
matrix:
target:
- x86_64-unknown-linux-gnu