name: Rust Documentation

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-22.04]
        compiler: [clang]

    runs-on: ${{ matrix.os }}

    steps:
    - name: Environment setup
      uses: actions/checkout@v4
    - name: Rust setup
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: nightly
    - name: Build documentation
      run: |
        cargo +nightly doc --package libceed-sys --package libceed --no-deps
