forked from nanocurrency/nano-node
-
Notifications
You must be signed in to change notification settings - Fork 52
104 lines (99 loc) · 3.9 KB
/
unit_tests.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
name: Unit Tests
on: [push, pull_request]
env:
RELEASE: 0
artifact: 0
jobs:
osx_test:
name: OSX unit tests [TEST_USE_ROCKSDB=${{ matrix.TEST_USE_ROCKSDB }}]
strategy:
fail-fast: false
matrix:
TEST_USE_ROCKSDB: [0, 1]
RELEASE:
- ${{ startsWith(github.ref, 'refs/tags/') }}
env:
BOOST_ROOT: /tmp/boost
TEST_USE_ROCKSDB: ${{ matrix.TEST_USE_ROCKSDB }}
RELEASE: ${{ matrix.RELEASE }}
runs-on: macOS-11
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
with:
submodules: "recursive"
- name: Fetch Deps
run: TEST=1 ci/actions/osx/install_deps.sh
- name: Build Tests
run: ci/build-ci.sh "/tmp/qt/lib/cmake/Qt5";
- name: Run Tests lmdb
if: ${{ matrix.TEST_USE_ROCKSDB == 0 }}
run: cd build && sudo TEST_USE_ROCKSDB=$TEST_USE_ROCKSDB ../ci/test.sh .
- name: Run Tests rocksdb
env:
DEADLINE_SCALE_FACTOR: 2
if: ${{ matrix.TEST_USE_ROCKSDB == 1 }}
run: cd build && sudo TEST_USE_ROCKSDB=$TEST_USE_ROCKSDB ../ci/test.sh .
linux_test:
name: Linux Unit Tests [TEST_USE_ROCKSDB=${{ matrix.TEST_USE_ROCKSDB }} - COMPILER=${{ matrix.COMPILER }}]
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
TEST_USE_ROCKSDB: [0, 1]
COMPILER: [gcc, clang]
RELEASE:
- ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-20.04
env:
COMPILER: ${{ matrix.COMPILER }}
TEST_USE_ROCKSDB: ${{ matrix.TEST_USE_ROCKSDB }}
RELEASE: ${{ matrix.RELEASE }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
with:
submodules: "recursive"
- name: Fetch Deps
run: ci/actions/linux/install_deps.sh
- name: Build Tests
run: docker run -e TEST_USE_ROCKSDB -e RELEASE -v ${PWD}:/workspace bananocoin/nano-env:${{ matrix.COMPILER }} /bin/bash -c "cd /workspace && ./ci/build-ci.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5"
- name: Run Tests lmdb
if: ${{ matrix.TEST_USE_ROCKSDB == 0 }}
run: docker run -e RELEASE -v ${PWD}:/workspace bananocoin/nano-env:${{ matrix.COMPILER }} /bin/bash -c "cd /workspace/build && ../ci/test.sh ."
- name: Run Tests rocksdb
if: ${{ matrix.TEST_USE_ROCKSDB == 1 }}
run: docker run -e TEST_USE_ROCKSDB -e DEADLINE_SCALE_FACTOR=2 -e RELEASE -v ${PWD}:/workspace bananocoin/nano-env:${{ matrix.COMPILER }} /bin/bash -c "cd /workspace/build && ../ci/test.sh ."
windows_test:
name: Windows Unit Tests [TEST_USE_ROCKSDB=${{ matrix.TEST_USE_ROCKSDB }}]
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
TEST_USE_ROCKSDB: [0, 1]
RELEASE:
- ${{ startsWith(github.ref, 'refs/tags/') }}
exclude:
- RELEASE: true
TEST_USE_ROCKSDB: 1
runs-on: windows-latest
env:
TEST_USE_ROCKSDB: ${{ matrix.TEST_USE_ROCKSDB }}
RELEASE: ${{ matrix.RELEASE }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
with:
submodules: "recursive"
- name: Windows Defender
run: ci/actions/windows/disable_windows_defender.ps1
- name: Fetch Deps
run: ci/actions/windows/install_deps.ps1
- name: Run Tests lmdb
if: ${{ matrix.TEST_USE_ROCKSDB == 0 }}
run: ci/actions/windows/build.ps1
- name: Run Tests rocksdb
if: ${{ matrix.TEST_USE_ROCKSDB == 1 }}
env:
DEADLINE_SCALE_FACTOR: 2
run: ci/actions/windows/build.ps1