Skip to content

Rdi 2212

Rdi 2212 #218

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths:
- 'build/**'
- 'gst.wasm/**'
- '.github/workflows/build.yaml'
pull_request:
branches:
- '**'
paths:
- 'build/**'
- 'gst.wasm/**'
- '.github/workflows/build.yaml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: 'ubuntu-latest'
steps: # these steps are used in README.md to describe preparation; keep in-sync, please!
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Install python deps (cerbero)
run: |
poetry install
git config --global protocol.file.allow always
- name: Bootstrap
run: |
poetry run cerbero -c build/gst.wasm.cbc bootstrap
- name: Build dependencies
run: |
poetry run cerbero -c build/gst.wasm.cbc build-deps gst.wasm
- name: Build gst.wasm
run: |
poetry run cerbero -c build/gst.wasm.cbc build gst.wasm
- name: Create tarball
if: ${{ github.ref == 'refs/heads/main' }}
run: |
tar -cvJf gst.wasm.tar.xz -C build/gst.wasm_web_wasm32/dist/web_wasm32 -c .
- name: Upload gst.wasm
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v4
with:
name: gst.wasm
path: gst.wasm.tar.xz
# Workaround for ghpages: https://github.com/orgs/community/discussions/13309
- name: Prepate artifact to pages
if: ${{ github.ref == 'refs/heads/main' }}
run: |
find ./build/gst.wasm_web_wasm32/dist/web_wasm32/share/gst.wasm/samples/ -name "*example*.html" -print -exec sed -i 's#</head>#<script src="../enable-threads.js"></script></head>#g' {} \;
- name: Setup Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/configure-pages@v5
- name: Upload pages artifact
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@v3
with:
path: './build/gst.wasm_web_wasm32/dist/web_wasm32/share/gst.wasm/samples'
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4