-
Notifications
You must be signed in to change notification settings - Fork 194
83 lines (75 loc) · 2.75 KB
/
testmac.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
name: Test Mac
# Run on our main branch and any PRs to it, and on release tags, but not every
# commit in every branch.
on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
jobs:
testmac:
name: Test on Mac
runs-on: macos-12
steps:
- name: Use cache
uses: actions/cache@v2
with:
path: |
deps
lib
include
bin
key: ${{ runner.os }}-12-${{ github.ref }}
# Restore keys are a "list", but really only a multiline string is
# accepted. Also we match by prefix. And the most recent cache is
# used, not the most specific.
# See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
restore-keys: |
${{ runner.os }}-12-${{ github.base_ref }}
${{ runner.os }}-12
- name: Checkout code without submodules
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Get or restore dependencies
run: scripts/restore-deps.sh
- name: Install packages
# We don't use artemnovichkov/action-homebrew because that's for Linux.
# We uninstall everything we don't need in order to prevent linking
# conflicts with existing/outdated packages, which we can't resolve
# because there's no way to tell Homebrew to force-link when installing
# from a Brewfile. We also update Protobuf to make sure we have 3.21.3+
# to avoid problems with ABI changes with/without -DNDEBUG.
# And we update libomp to make extra sure it will be picked up by the compiler.
# We pre-install a pinned txm to work around https://github.com/anko/txm/issues/8
run: |
brew bundle cleanup --force && \
brew bundle install && \
brew update && \
brew install protobuf && \
brew install libomp && \
npm install -g [email protected] && \
brew config && \
(brew doctor || echo "brew doctor is unhappy")
- name: Run build and test
run: |
export VG_FULL_TRACEBACK=1
echo "Build with $(nproc) threads"
set +e
make -j$(nproc) test
RETVAL=$?
set -e
# Whether vg testing succeeds or fails, see if we can get any Apple crash logs for it.
ls ~/Library/Logs/DiagnosticReports/
for CRASH_FILE in $(ls ~/Library/Logs/DiagnosticReports/vg-* 2>/dev/null) ; do
echo "vg crash report found: ${CRASH_FILE}"
cat ${CRASH_FILE}
done
exit $RETVAL
shell: bash