Repository navigation
unit tests for @ffmpeg/core #783
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build-core: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@v2 | |
| - name: Update pkg-config database | |
| run: sudo ldconfig | |
| - name: Setup Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Cache build | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: build-cache-st | |
| key: build-cache-st-v1-${{ hashFiles('Dockerfile', 'Makefile', 'build/*') }} | |
| restore-keys: | | |
| build-cache-st-v1- | |
| - name: Build ffmpeg-core | |
| run: make prd EXTRA_ARGS="--cache-from=type=local,src=build-cache-st --cache-to=type=local,dest=build-cache-st,mode=max" | |
| - name: Upload core | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ffmpeg-core | |
| path: packages/core/dist/* | |
| build-core-mt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@v2 | |
| - name: Setup Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Cache build | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: build-cache-mt | |
| key: build-cache-mt-v1-${{ hashFiles('Dockerfile', 'Makefile', 'build/*') }} | |
| restore-keys: | | |
| build-cache-v1- | |
| - name: Build ffmpet-core-mt | |
| run: make prd-mt EXTRA_ARGS="--cache-from=type=local,src=build-cache-mt --cache-to=type=local,dest=build-cache-mt,mode=max" | |
| - name: Upload core-mt | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ffmpeg-core-mt | |
| path: packages/core-mt/dist/* | |
| tests: | |
| # Node 22 (the oldest LTS release), 24 and 26. | |
| runs-on: ubuntu-latest | |
| needs: [build-core, build-core-mt] | |
| strategy: | |
| matrix: | |
| node: [22, 24, 26] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ffmpeg-core | |
| path: packages/core/dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ffmpeg-core-mt | |
| path: packages/core-mt/dist | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test --project core-st --project core-mt | |
| browser: | |
| # @ffmpeg/ffmpeg and @ffmpeg/util in Chromium. | |
| runs-on: ubuntu-latest | |
| needs: [build-core, build-core-mt] | |
| strategy: | |
| matrix: | |
| node: [22, 24, 26] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ffmpeg-core | |
| path: packages/core/dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ffmpeg-core-mt | |
| path: packages/core-mt/dist | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test:install | |
| - run: pnpm test --project browser-st --project browser-mt |