Skip to content

refactor(radio): introduce interact() function for interacting with… #93

refactor(radio): introduce interact() function for interacting with…

refactor(radio): introduce interact() function for interacting with… #93

Workflow file for this run

name: node-medley native module
on:
push:
branches:
- main
- develop
paths:
- .github/workflows/node-medley.yml
- packages/node-medley/src/**
- packages/node-medley/scripts/**
- packages/node-medley/binding.gyp
- packages/node-medley/package.json
- scripts/brew.sh
jobs:
build:
strategy:
matrix:
include:
- runs-on: ubuntu-20.04
node_version: 18
node_arch: x64
build-arch: linux-x64
- runs-on: windows-latest
node_version: 18
node_arch: x64
build-arch: win32-x64
- runs-on: macos-12
node_version: 18
node_arch: x64
build-arch: darwin-x64
- runs-on: [self-hosted, macOS, ARM64]
node_version: 18
node_arch: arm64
build-arch: darwin-arm64
name: Build ${{ matrix.build-arch }}
runs-on: ${{ matrix.runs-on }}
env:
BUILD_ARCH: ${{ matrix.build-arch }}
steps:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.node_arch }}
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Make sure pnpm fetch Node
shell: bash
run: |
pnpm &>/dev/null || true
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-${{ runner.arch }}-pnpm-store-native-build
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-pnpm-store-native-build
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dependencies (Linux)
if: contains(matrix.build-arch, 'linux')
run: |
sudo apt -y update
sudo apt -y install g++ make pkg-config libtag1-dev libsamplerate0-dev libfreetype6-dev libcurl4-openssl-dev libasound2-dev libx11-dev libxrandr-dev
- name: Get brew directory
id: brew-cache
if: contains(matrix.build-arch, 'darwin')
shell: bash
run: |
echo "STORE_PATH=$(brew --prefix)/Cellar" >> $GITHUB_OUTPUT
- name: Cache brew deps
if: contains(matrix.build-arch, 'darwin')
uses: actions/cache@v3
with:
path: |
${{ steps.brew-cache.outputs.STORE_PATH }}/taglib
${{ steps.brew-cache.outputs.STORE_PATH }}/libsamplerate
key: macos-build-cache-${{ runner.arch }}-${{ hashFiles('./scripts/brew.sh') }}
- name: Dependencies (macOS)
if: contains(matrix.build-arch, 'darwin')
run: |
bash ./scripts/brew.sh
- name: Cache vcpkg
if: contains(matrix.build-arch, 'win32')
uses: actions/cache@v3
with:
path: |
C:\vcpkg\packages
C:\vcpkg\installed
key: windows-build-vcpkg-cache
- name: Dependencies (Windows)
if: contains(matrix.build-arch, 'win32')
run: |
vcpkg integrate install
vcpkg install libsamplerate:x64-windows-static taglib:x64-windows-static zlib:x64-windows-static
- name: Prepare
working-directory: ./packages/node-medley
run: |
pnpm install --no-frozen-lockfile --ignore-scripts
- name: Build native
working-directory: ./packages/node-medley
run: |
pnpm run prebuild
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build-arch }}
path: ./packages/node-medley/prebuilds