Skip to content

Commit

Permalink
Merge pull request #1001 from JuliaRobotics/24Q1/docs/ownci
Browse files Browse the repository at this point in the history
Docs Ci/CD separate yml
  • Loading branch information
dehann authored Jan 23, 2024
2 parents aa660d5 + 473d603 commit 771d5fd
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 38 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/BuildDocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI/CD Docs
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
docs:
name: 'Build Docs'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- jlenv: 'docs/'
makejl: 'docs/make.jl'
# - jlenv: 'docs/pdf/'
# makejl: 'docs/pdf/make.jl'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'
arch: x64
- name: 'Pkgs for Docs on ${{ github.head_ref }}'
run: |
export JULIA_PKG_SERVER=""
[ '${{ github.ref }}' == 'refs/heads/master' ] && export CJL_DOCS_BRANCH="master" || export CJL_DOCS_BRANCH="${{ github.head_ref }}"
export JULIA_PKG_PRECOMPILE_AUTO=0
julia -e 'println("Julia gets branch: ",ENV["CJL_DOCS_BRANCH"])'
julia --project=${{ matrix.jlenv }} --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); Pkg.add(PackageSpec(name="Caesar", rev=ENV["CJL_DOCS_BRANCH"]))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="RoME", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="RoMEPlotting", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="KernelDensityEstimatePlotting", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="IncrementalInference", rev="master"))'
- name: 'Docs make.jl'
run: |
export JULIA_PKG_PRECOMPILE_AUTO=0
export DOCUMENTER_DEBUG="true"
julia --project=${{ matrix.jlenv }} --color=yes ${{ matrix.makejl }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
JULIA_PKG_SERVER: ""
38 changes: 3 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,45 +126,13 @@ jobs:
git config --global user.email [email protected]
- name: Run tests on Upstream Dev
run: |
export JULIA_PKG_PRECOMPILE_AUTO=0
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="RoME",rev="master"));'
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="IncrementalInference",rev="master"));'
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="ApproxManifoldProducts",rev="master"));'
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.add(PackageSpec(name="DistributedFactorGraphs",rev="master"));'
unset JULIA_PKG_PRECOMPILE_AUTO
julia --project=@. --check-bounds=yes -e 'using Pkg; Pkg.test("Caesar"; coverage=false)'
shell: bash

docs:
name: 'Build Docs'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- jlenv: 'docs/'
makejl: 'docs/make.jl'
# - jlenv: 'docs/pdf/'
# makejl: 'docs/pdf/make.jl'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- name: 'Pkgs for Docs on ${{ github.head_ref }}'
run: |
export JULIA_PKG_SERVER=""
[ '${{ github.ref }}' == 'refs/heads/master' ] && export CJL_DOCS_BRANCH="master" || export CJL_DOCS_BRANCH="${{ github.head_ref }}"
export JULIA_PKG_PRECOMPILE_AUTO=0
julia -e 'println("Julia gets branch: ",ENV["CJL_DOCS_BRANCH"])'
julia --project=${{ matrix.jlenv }} --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); Pkg.add(PackageSpec(name="Caesar", rev=ENV["CJL_DOCS_BRANCH"]))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="RoME", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="RoMEPlotting", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="KernelDensityEstimatePlotting", rev="master"))'
julia --project=${{ matrix.jlenv }} -e 'using Pkg; Pkg.add(PackageSpec(name="IncrementalInference", rev="master"))'
- name: 'Docs make.jl'
run: |
export DOCUMENTER_DEBUG="true"
export JULIA_PKG_PRECOMPILE_AUTO=0
julia --project=${{ matrix.jlenv }} --color=yes ${{ matrix.makejl }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
JULIA_PKG_SERVER: ""

8 changes: 5 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ makedocs(
"Literature" => [
"References" => "refs/literature.md"
],
]
],
# FIXME remove warnonly option once :missing_docs and :cross_references fixes are done
warnonly = Documenter.except(:autodocs_block, :docs_block, :doctest, :linkcheck, :eval_block, :example_block, :footnote, :linkcheck_remotes, :meta_block, :parse_error, :setup_block), # , :cross_references, :missing_docs
# html_prettyurls = !("local" in ARGS),
)

)
# The possible Symbol values that can be passed to the function are: :autodocs_block, :cross_references, :docs_block, :doctest, :eval_block, :example_block, :footnote, :linkcheck_remotes, :linkcheck, :meta_block, :missing_docs, :parse_error, and :setup_block.

deploydocs(
repo = "github.com/JuliaRobotics/Caesar.jl.git",
Expand Down

0 comments on commit 771d5fd

Please sign in to comment.