Skip to content

Commit

Permalink
Merge new-api branch
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozyra95 committed Dec 7, 2023
2 parents d6143f9 + 59b770d commit a2e6531
Show file tree
Hide file tree
Showing 294 changed files with 40,278 additions and 8,220 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: build, lint and test
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
check:
runs-on: ubuntu-latest
container:
image: ubuntu:mantic-20231011
steps:
- name: 🛠 Install system dependencies
run: |
set -e
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
apt-get update -y -qq
apt-get install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev ttf-mscorefonts-installer
# required when job is running in docker container
apt-get install -y build-essential curl pkg-config git libssl-dev libclang-dev libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0
- name: 🔧 Install the rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: 🔬 Install nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: 🛠 Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20

- name: 📥 Checkout repo
uses: actions/checkout@v3
with:
submodules: 'true'

- name: 📁 Rust cache
uses: Swatinem/rust-cache@v2

- name: 🪢 Generate Chromium Embedded Framework bindings
run: cargo build --package compositor_chromium

- name: 📖 Check formatting
run: cargo fmt --all --check

- name: 📎 Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

- name: 📄 Generate JSON schema
run: |
cargo run --bin generate_json_schema
cargo run --bin generate_docs
- name: 🖋️ Run website lint + typecheck + build
working-directory: ./docs
run: |
npm ci
npm run typecheck && npm run lint --max-warnings=0 && npm run build
- name: 🧪 Run tests
run: cargo nextest run --no-fail-fast --workspace

- name: 📦 Upload failed snapshot test artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: failed_snapshot_tests
path: failed_snapshot_tests
retention-days: 2

- name: 📚 Run doctests
run: cargo test --workspace --doc
69 changes: 69 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: deploy to gh-pages

on:
workflow_dispatch: {}
push:
branches: [master, new-api]
paths:
- "docs/**"
- "schemas/**"
- ".github/workflows/deploy_docs.yml"

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
container:
image: ubuntu:mantic-20231011
defaults:
run:
working-directory: ./docs
steps:
- name: 📥 Checkout repo
uses: actions/checkout@v3

- name: 🛠 Install system dependencies
run: |
set -e
apt-get update -y -qq
apt-get install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev
# required when job is running in docker container
apt-get install -y build-essential curl pkg-config git libssl-dev libclang-dev libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0
- name: 🛠 Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20

- name: 🔧 Install the rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: 📄 Generate docs from JSON schema
run: cargo run --bin generate_docs

- name: 🛠 Install dependencies
run: npm ci

- name: 📦 Build website
run: npm run build

- name: 🖋️ Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
cname: compositor.live
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target/
# Generated during runtime
/shmem
/failed_snapshot_tests
/docs/pages/api/generated

/video_compositor.app
/video_compositor
Expand Down
Loading

0 comments on commit a2e6531

Please sign in to comment.