fix(macos): support verified QQ builds on arm64 and x64
This commit is contained in:
1 parent
b31e1c0f0c
commit
1c0f7cce4f
11 files changed
+628
-2
No files matched your search
@@ -0,0 +1,56 @@
|
||||
name: macOS native compatibility
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- packages/napcat-native/**
|
||||
- .github/tests/macos-native/**
|
||||
- .github/workflows/macos-native.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- packages/napcat-native/**
|
||||
- .github/tests/macos-native/**
|
||||
- .github/workflows/macos-native.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
native:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runner: macos-15
|
||||
arch: arm64
|
||||
- runner: macos-15-intel
|
||||
arch: x64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
architecture: ${{ matrix.arch }}
|
||||
- name: Build QQ ABI mock
|
||||
working-directory: .github/tests/macos-native
|
||||
run: |
|
||||
npm install --prefix headers --ignore-scripts --no-package-lock node-api-headers@1.6.0
|
||||
clang++ -std=c++17 -O0 -g -bundle -undefined dynamic_lookup -I headers/node_modules/node-api-headers/include wrapper.cpp -o wrapper.node
|
||||
codesign --force --sign - wrapper.node
|
||||
- name: Exercise native packet hooks
|
||||
run: node --test .github/tests/macos-native/hooks.test.cjs
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: NapNeko/ffmpegAddon
|
||||
ref: 3a6e99cea9a856ca71f7d70e11d6d769498121d9
|
||||
path: ffmpeg-native-tests
|
||||
- name: Verify packaged FFmpeg
|
||||
working-directory: ffmpeg-native-tests
|
||||
env:
|
||||
FFMPEG_ADDON_PATH: ${{ github.workspace }}/packages/napcat-native/ffmpeg/ffmpegAddon.darwin.${{ matrix.arch }}.node
|
||||
run: |
|
||||
npm ci --ignore-scripts
|
||||
node --test test/video-info.test.js
|
||||
Reference in new issue
Block a user