-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
294 changed files
with
40,278 additions
and
8,220 deletions.
There are no files selected for viewing
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
Oops, something went wrong.