forked from steemit/fc
-
Notifications
You must be signed in to change notification settings - Fork 90
57 lines (57 loc) · 1.7 KB
/
build-and-test-macos.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
name: macOS
on: [ push, pull_request ]
env:
CCACHE_COMPRESS: exists means true
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros
jobs:
test-macos:
name: Build and run tests in macOS
strategy:
matrix:
os: [macos-11.0]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew install autoconf automake libtool
brew install ccache
brew install parallel
brew search boost
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] \
..
popd
- 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 2 -C _build
df -h
- name: Unit-Tests
run: |
parallel echo Running {}\; sh -c "./{}" <<_EOT_
tests/run-parallel-tests.sh _build/tests/all_tests -l test_suite
_build/tests/bloom_test -- README.md
_build/tests/ecc_test README.md
_build/tests/hmac_test
_build/tests/task_cancel_test
_EOT_