forked from MVPWorkshop/filecoin-solidity-library
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (80 loc) · 2.87 KB
/
main.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
name: "Main"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
dep-install:
name: "Run dependency install"
timeout-minutes: 30
runs-on: ubuntu-22.04
steps:
- name: Install node
uses: actions/setup-node@v2
with:
node-version: "20.0.0"
- name: Install yarn
run: npm install -g yarn
- name: Checkout repo
uses: actions/checkout@main
with:
submodules: "true"
- name: Install other dependencies
run: |
sudo apt-get update
sudo apt-get -y install hwloc jq pkg-config bzr ocl-icd-opencl-dev
sudo apt install -y mesa-opencl-icd ocl-icd-opencl-dev ntpdate ubuntu-drivers-common gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget
sudo apt install zsh -y
make install_solc_linux
# yarn install
make install-opencl
sudo echo /usr/lib/aarch64-linux-gnu/libhwloc.so.15 | xargs -I {} sudo ln -s {} /usr/lib/libhwloc.so
sudo ln -s /usr/lib/aarch64-linux-gnu/libOpenCL.so.1 /usr/lib/libOpenCL.so
# echo "--> Finding libhwloc"
# sudo find / -name "libhwloc*"
# echo "--> Finding libOpenCL"
# sudo find / -name "libOpenCL*"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Restore crates
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }}
# smoke-tests:
# name: "Run smoke tests"
# timeout-minutes: 30
# runs-on: ubuntu-22.04
# needs: [dep-install]
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# submodules: "true"
# - name: Compile contracts
# run: ./testing/smoke_tests.sh
miner-integration:
name: "Miner API: integration tests"
timeout-minutes: 30
runs-on: ubuntu-22.04
needs: [dep-install]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: "true"
- name: Run miner test
run: |
cd testing
rustup target add wasm32-unknown-unknown
cargo test miner_test