Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get GH Actions workflow running on Mac + Linux #305

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 48 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,59 @@
name: Test

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
DISPLAY: :0
steps:
- uses: FedericoCarboni/setup-ffmpeg@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- if: runner.os == 'macOS'
run: |
brew install \
cairo \
ffmpeg \
giflib \
jpeg \
libpng \
librsvg \
pango \
pixman \
pkg-config \
python-setuptools
- if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential \
ffmpeg \
libcairo2-dev \
libgif-dev \
libglew-dev \
libglu1-mesa-dev \
libjpeg-dev \
libpango1.0-dev \
librsvg2-dev \
libxi-dev \
pkg-config
- if: runner.os == 'Linux'
run: sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'yarn'

- run: yarn install --frozen-lockfile
node-version: 22
cache: "npm"
cache-dependency-path: ./package.json
- run: npm install --build-from-source
- run: npm run lint
- run: npm run test

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: video
name: video-${{ runner.os }}
path: editly-out.mp4
2 changes: 1 addition & 1 deletion examples/customCanvas.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import editly from '..';
import editly from '../index.js';

async function func({ canvas }) {
async function onRender(progress) {
Expand Down
2 changes: 1 addition & 1 deletion examples/customFabric.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import editly from '..';
import editly from '../index.js';

/* eslint-disable spaced-comment,no-param-reassign */

Expand Down
2 changes: 1 addition & 1 deletion examples/fabricImagePostProcessing.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import editly from '..';
import editly from '../index.js';

// See https://github.com/mifi/editly/pull/222

Expand Down
2 changes: 1 addition & 1 deletion examples/renderSingleFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { parse } from 'json5';
import fsExtra from 'fs-extra';

// eslint-disable-next-line import/named
import { renderSingleFrame } from '..';
import { renderSingleFrame } from '../index.js';

(async () => {
await renderSingleFrame({
Expand Down
Loading