Update documentation formatting and infrastructure (#792) #692
This file contains hidden or 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
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags: '*' | |
| workflow_dispatch: | |
| # needed to allow julia-actions/cache to delete old caches that it has created | |
| permissions: | |
| actions: write | |
| contents: read | |
| jobs: | |
| test: | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - NaN-safe mode ${{ matrix.nansafe && 'enabled' || 'disabled' }} - ${{ github.event_name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - 'min' | |
| - 'lts' | |
| - '1' | |
| - 'pre' | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macOS-latest | |
| nansafe: | |
| - true | |
| - false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: ${{ matrix.version }} | |
| - uses: julia-actions/cache@v2 | |
| - name: Set NaN-safe mode preference | |
| run: | | |
| open(joinpath(pwd(), "Project.toml"), "a") do io | |
| println(io, "\n[preferences.ForwardDiff]\nnansafe_mode = ${{ matrix.nansafe }}\n") | |
| end | |
| shell: julia --color=yes {0} | |
| - uses: julia-actions/julia-buildpkg@v1 | |
| - uses: julia-actions/julia-runtest@v1 | |
| - uses: julia-actions/julia-processcoverage@v1 | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1' | |
| - uses: julia-actions/cache@v2 | |
| - name: Set up environment | |
| run: julia --project=docs -e 'using Pkg; Pkg.instantiate()' | |
| - name: Run doctests | |
| shell: julia --project=docs {0} | |
| run: | | |
| using Documenter: doctest | |
| using ForwardDiff | |
| doctest(ForwardDiff) | |
| - name: Build and deploy documentation | |
| run: julia --project=docs docs/make.jl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |