diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 93176758..a7d65e29 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -48,11 +48,6 @@ jobs: run: | import GRAPE include(pkgdir(GRAPE, "test", "runtests.jl")) - - name: "Summarize coverage" - shell: julia --project=test {0} - run: | - using QuantumControlTestUtils - show_coverage() - uses: julia-actions/julia-processcoverage@v1 - name: "Summarize coverage" run: julia --project=test -e 'using QuantumControlTestUtils; show_coverage();' @@ -60,6 +55,14 @@ jobs: with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} + - name: Save Julia depot cache on cancel or failure + id: julia-cache-save + if: cancelled() || failure() + uses: actions/cache/save@v4 + with: + path: | + ${{ steps.julia-cache.outputs.cache-paths }} + key: ${{ steps.julia-cache.outputs.cache-key }} docs: name: Documentation runs-on: ubuntu-latest @@ -78,10 +81,10 @@ jobs: wget https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/scripts/installorg.jl install -m 600 -D /dev/null ~/.ssh/known_hosts ssh-keyscan -H github.com > ~/.ssh/known_hosts - julia --project=test -e 'include("installorg.jl"); installorg(; github="develop")' + julia --project=docs -e 'include("installorg.jl"); installorg(; github="develop")' # installing in develop mode enables proper "source" links in subpackage APIs - name: "Build documentation" - run: julia --project=test docs/make.jl + run: julia --project=docs docs/make.jl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} @@ -96,6 +99,14 @@ jobs: path: | README.md ./docs.zip + - name: Save Julia depot cache on cancel or failure + id: julia-cache-save + if: cancelled() || failure() + uses: actions/cache/save@v4 + with: + path: | + ${{ steps.julia-cache.outputs.cache-paths }} + key: ${{ steps.julia-cache.outputs.cache-key }} codestyle: name: Codestyle runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 82a7eddb..6aa99265 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ /Manifest.toml /test/Manifest.toml /docs/Manifest.toml -/docs/Project.toml /docs/build/ /gh-pages/ /.JuliaFormatter.toml diff --git a/Makefile b/Makefile index 4297b8c3..ab592b48 100644 --- a/Makefile +++ b/Makefile @@ -30,13 +30,16 @@ test/Manifest.toml: test/Project.toml ../scripts/installorg.jl $(JULIA) --project=test ../scripts/installorg.jl @touch $@ +docs/Manifest.toml: docs/Project.toml ../scripts/installorg.jl + $(JULIA) --project=docs ../scripts/installorg.jl + @touch $@ devrepl: ## Start an interactive REPL for testing and building documentation $(JULIA) --project=test --banner=no --startup-file=yes -i devrepl.jl -docs: test/Manifest.toml ## Build the documentation - $(JULIA) --project=test docs/make.jl +docs: docs/Manifest.toml ## Build the documentation + $(JULIA) --project=docs docs/make.jl @echo "Done. Consider using 'make devrepl'" servedocs: test/Manifest.toml ## Build (auto-rebuild) and serve documentation at PORT=8000 diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 00000000..533062f8 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,17 @@ +[deps] +DocInventories = "43dc2714-ed3b-44b5-b226-857eda1aa7de" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656" +GRAPE = "6b52fcaf-80fe-489a-93e9-9f92080510be" +Krotov = "b05dcdc7-62f6-4360-bf2c-0898bba419de" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +QuantumControl = "8a270532-f23f-47a8-83a9-b33d10cad486" +QuantumPropagators = "7bf12567-5742-4b91-a078-644e72a65fc1" + +[sources] +QuantumControl = {path = ".."} + +[compat] +Documenter = "1.4" +julia = "1.11" diff --git a/docs/make.jl b/docs/make.jl index 262aaf4d..06df249c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,4 +1,5 @@ using Pkg +Pkg.develop(path=joinpath(@__DIR__, "..")) using Documenter using QuantumPropagators @@ -128,5 +129,4 @@ makedocs(; ) println("Finished makedocs") - -deploydocs(; repo="github.com/JuliaQuantumControl/QuantumControl.jl") +deploydocs(; repo="github.com/JuliaQuantumControl/QuantumControl.jl", push_preview=true) diff --git a/test/Project.toml b/test/Project.toml index 5a6cc85d..e5cb31a0 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -48,6 +48,9 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" +[sources] +QuantumControl = {path = ".."} + [compat] Documenter = "1.4" julia = "1.9" diff --git a/test/clean.jl b/test/clean.jl index 01e2bbfb..81efcab9 100644 --- a/test/clean.jl +++ b/test/clean.jl @@ -38,7 +38,6 @@ function clean(; distclean=false, _exit=true) for folder in ["", "docs", "test"] _push!(DISTCLEAN, joinpath(joinpath(ROOT, folder), "Manifest.toml")) end - _push!(DISTCLEAN, joinpath(ROOT, "docs", "Project.toml")) _push!(DISTCLEAN, joinpath(ROOT, "docs", "src", "examples", ".ipynb_checkpoints")) _push!(DISTCLEAN, joinpath(ROOT, ".JuliaFormatter.toml")) ###########################################################################