-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (37 loc) · 1.06 KB
/
cpp.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
name: Ubuntu C++ Tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install Yarn dependencies and build
run: |
yarn
yarn build
- name: Start Hardhat node in background
run: |
yarn node &
echo "NODE_PID=$!" >> $GITHUB_ENV
- name: Install prerequisites for C++ build
run: sudo apt-get update && sudo apt-get install -y cmake build-essential libboost-all-dev libssl-dev libcurl4-openssl-dev libsodium-dev
- name: Create and change into Build Directory
run: |
mkdir -p test/cpp/build
cd test/cpp/build
- name: CMake Generate
run: cmake -B. -H..
- name: Compile
run: cmake --build .
- name: Run C++ tests
run: ctest -VV --repeat until-pass:2 --test-dir .
- name: Kill Yarn node
run: kill $NODE_PID
if: always()