-
Notifications
You must be signed in to change notification settings - Fork 649
85 lines (85 loc) · 2.94 KB
/
build-and-test.mac.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
name: macOS
on: [ push, pull_request ]
env:
CCACHE_COMPRESS: exists means true
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros
jobs:
build-osx:
name: Build and test in macOS
strategy:
matrix:
os: [macos-11]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew install autoconf automake libtool
brew install ccache
brew install parallel
brew install bitshares/boost/[email protected]
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: |
mkdir -p _build
pushd _build
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D BOOST_ROOT=/usr/local/opt/[email protected] \
-D OPENSSL_ROOT_DIR=/usr/local/opt/[email protected] \
..
- name: Load Cache
uses: actions/cache@v3
with:
path: ccache
key: ccache-${{ matrix.os }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-${{ matrix.os }}-${{ github.ref }}-
ccache-${{ matrix.os }}-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 3 -C _build witness_node cli_wallet app_test cli_test chain_test
df -h
- name: Unit-Tests
timeout-minutes: 15
run: |
_build/tests/app_test -l test_suite
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
_build/tests/cli_test -l test_suite
df -h
- name: Quick test for program arguments
run: |
_build/programs/witness_node/witness_node --version
_build/programs/witness_node/witness_node --help
if _build/programs/witness_node/witness_node --bad-arg ; then \
echo "Fail: did not get expected error."; false; \
else \
echo "Pass: got expected error."; \
fi
if _build/programs/witness_node/witness_node --plugins "account_history elasticsearch" ; then \
echo "Fail: did not get expected error."; false; \
else \
echo "Pass: got expected error."; \
fi
if _build/programs/witness_node/witness_node --rpc-endpoint --plugins "witness"; then \
echo "Fail: did not get expected error."; false; \
else \
echo "Pass: got expected error."; \
fi
_build/programs/cli_wallet/cli_wallet --version
_build/programs/cli_wallet/cli_wallet --help
_build/programs/cli_wallet/cli_wallet --suggest-brain-key
if _build/programs/cli_wallet/cli_wallet --bad-arg ; then \
echo "Fail: did not get expected error."; false; \
else \
echo "Pass: got expected error."; \
fi
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test