Expanded support for Libcamera Controls (ControlInfoMap and ControlInfo) #123
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
on: [push, pull_request] | |
name: CI | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build_and_test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install libcamera | |
run: | | |
sudo pip3 install meson | |
sudo apt-get -y install libyaml-dev python3-yaml python3-ply python3-jinja2 ninja-build clang | |
git clone https://git.libcamera.org/libcamera/libcamera.git deps/libcamera --branch v0.1.0 | |
cd deps/libcamera | |
# Use only VIMC for faster builds | |
meson build -Dipas=vimc -Dpipelines=vimc | |
sudo ninja -C build install | |
- name: Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Build | |
run: cargo build | |
- name: Test | |
run: cargo test | |
- name: Clippy | |
run: cargo clippy -- -D warnings | |
- name: Generate docs | |
env: | |
RUSTDOCFLAGS: "-Dwarnings" | |
run: cargo doc --no-deps --lib | |
- name: Upload docs artifact | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: target/doc | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check | |
docs: | |
name: Publish docs | |
runs-on: ubuntu-latest | |
needs: [build_and_test, rustfmt] | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: docs | |
path: . | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |