Skip to content

Merge pull request #4421 from vgteam/path-normalize #1691

Merge pull request #4421 from vgteam/path-normalize

Merge pull request #4421 from vgteam/path-normalize #1691

Workflow file for this run

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-15
steps:
- name: Use cache
uses: actions/cache@v2
with:
path: |
deps
lib
include
bin
key: ${{ runner.os }}-15-${{ 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 }}-15-${{ github.base_ref }}
${{ runner.os }}-15
- 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 txm@7.4.5 && \
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