Skip to content

chore(deps): bump braces from 3.0.2 to 3.0.3 #26

chore(deps): bump braces from 3.0.2 to 3.0.3

chore(deps): bump braces from 3.0.2 to 3.0.3 #26

Workflow file for this run

name: Test on MacOS
on:
push:
paths:
- "**"
- "!*.md"
- "!.github"
- ".github/workflows/ci-macos.yml"
branches:
- master
- "releases/**"
tags-ignore:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- master
- "releases/**"
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
os: [macos-11]
node: [16]
runtime_link: [static, shared]
use_global_liblzma: [true, false]
enable_threads: [no]
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} / System Xz ? ${{ matrix.use_global_liblzma }} / Threading enabled ? ${{ matrix.enable_threads }} / Runtime is ${{ matrix.runtime_link }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
architecture: x64
- name: Install
run: yarn install
env:
USE_GLOBAL: ${{ matrix.use_global_liblzma }}
RUNTIME_LINK: ${{ matrix.runtime_link }}
ENABLE_THREAD_SUPPORT: ${{ matrix.enable_threads }}
- name: Test
run: yarn test
check:
name: Checking if system library is multi threading capable
runs-on: 'macos-11'
# Map the job outputs to step outputs
outputs:
static-has-mt: ${{ steps.check-mt.outputs.STATIC }}
shared-has-mt: ${{ steps.check-mt.outputs.SHARED }}
steps:
- name: Checking if system library is multi threading capable
id: check-mt
run: |
if nm -a /usr/local/lib/liblzma.a | grep lzma_stream_encoder_mt
then
echo "Static system library is multi threading capable: yes"
echo '::set-output name=STATIC::true'
else
echo "Static system library is multi threading capable: no"
echo '::set-output name=STATIC::false'
fi
if nm -a /usr/local/lib/liblzma.dylib | grep lzma_stream_encoder_mt
then
echo "Dynamic system library is multi threading capable: yes"
echo '::set-output name=SHARED::true'
else
echo "Dynamic system library is multi threading capable: no"
echo '::set-output name=SHARED::false'
fi
test-mt:
needs: check
strategy:
fail-fast: false
matrix:
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
os: [macos-11]
node: [16]
runtime_link: [static, shared]
use_global_liblzma: [true, false]
enable_threads: [yes]
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} / System Xz ? ${{ matrix.use_global_liblzma }} / Threading enabled ? ${{ matrix.enable_threads }} / Runtime is ${{ matrix.runtime_link }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
architecture: x64
- name: debug
run: |
echo use_global_liblzma: ${{ matrix.use_global_liblzma }}
echo static-has-mt: ${{ needs.check.outputs.static-has-mt }}
echo shared-has-mt: ${{ needs.check.outputs.shared-has-mt }}
echo pkg-config: $(pkg-config --libs --static liblzma)
- name: Install
if: "!matrix.use_global_liblzma || (matrix.runtime_link == 'static' && needs.check.outputs.static-has-mt != 'false') || (matrix.runtime_link == 'shared' && needs.check.outputs.shared-has-mt != 'false')"
run: yarn install
env:
USE_GLOBAL: ${{ matrix.use_global_liblzma }}
RUNTIME_LINK: ${{ matrix.runtime_link }}
ENABLE_THREAD_SUPPORT: ${{ matrix.enable_threads }}
- name: Test
if: "!matrix.use_global_liblzma || (matrix.runtime_link == 'static' && needs.check.outputs.static-has-mt != 'false') || (matrix.runtime_link == 'shared' && needs.check.outputs.shared-has-mt != 'false')"
run: yarn test