mirror of
https://github.com/LukeHagar/usage-statistics.git
synced 2025-12-06 04:21:55 +00:00
fix: add system dependencies and native module rebuild for skia-canvas
This commit is contained in:
36
.github/workflows/test-action-local.yml
vendored
36
.github/workflows/test-action-local.yml
vendored
@@ -15,14 +15,50 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v1
|
uses: oven-sh/setup-bun@v1
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
|
|
||||||
|
- name: Install system dependencies for skia-canvas
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
libcairo2-dev \
|
||||||
|
libpango1.0-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libgif-dev \
|
||||||
|
librsvg2-dev \
|
||||||
|
libpixman-1-dev \
|
||||||
|
pkg-config \
|
||||||
|
python3 \
|
||||||
|
make \
|
||||||
|
g++ \
|
||||||
|
libstdc++6
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
|
|
||||||
|
- name: Rebuild native modules
|
||||||
|
env:
|
||||||
|
NODE_ENV: production
|
||||||
|
SKIA_CANVAS_USE_SYSTEM_LIBRARIES: 1
|
||||||
|
NODE_PATH: ${{ github.workspace }}/node_modules
|
||||||
|
run: |
|
||||||
|
# Try rebuilding with npm first, then bun
|
||||||
|
npm rebuild skia-canvas || bun rebuild skia-canvas
|
||||||
|
# Debug: Check what's in the skia-canvas directory
|
||||||
|
ls -la node_modules/skia-canvas/lib/classes/
|
||||||
|
# Verify the module can be loaded
|
||||||
|
node -e "console.log('Testing skia-canvas import...'); require('skia-canvas'); console.log('✅ skia-canvas loaded successfully')"
|
||||||
|
|
||||||
- name: Build action
|
- name: Build action
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user