From 66ee947ec6c0e918f2a5857bbc71f3f4e5544a5b Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Fri, 20 Sep 2024 00:33:14 -0400 Subject: [PATCH 1/4] Start --- .github/workflows/CI.yml | 24 ++++++++++++++++++++++++ .github/workflows/Documentation.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 1 + .typos.toml | 2 +- docs/Project.toml | 5 +++++ docs/make.jl | 17 +++++++++++++++++ docs/{ => src}/aws_gpu_setup.md | 0 docs/{ => src}/dev_env_info.md | 0 docs/src/index.md | 1 + docs/{ => src}/nsys_profiling.md | 0 10 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Documentation.yml create mode 100644 docs/Project.toml create mode 100644 docs/make.jl rename docs/{ => src}/aws_gpu_setup.md (100%) rename docs/{ => src}/dev_env_info.md (100%) create mode 100644 docs/src/index.md rename docs/{ => src}/nsys_profiling.md (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d5ecd5..fedd296 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,3 +52,27 @@ jobs: - uses: codecov/codecov-action@v4 with: file: lcov.info + docs: + name: Documentation + runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }} + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: "1" + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: | + julia --project=docs -e ' + using Documenter: doctest + using TrixiEnzyme # change MyAwesomePackage to the name of your package + doctest(TrixiEnzyme)' # change MyAwesomePackage to the name of your package + - run: julia --project=docs docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..5591e22 --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,29 @@ +name: Documentation +on: + push: + branches: + - main # update to match your development branch (master, main, dev, trunk, ...) + tags: "*" + pull_request: + +jobs: + build: + permissions: + actions: write + contents: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: "1" + - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl diff --git a/.gitignore b/.gitignore index 38d09c7..85b7a25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ **/Manifest.toml out*/ +docs/build .DS_Store diff --git a/.typos.toml b/.typos.toml index e3e12b9..0840da3 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,4 +1,4 @@ [files] extend-exclude = [ - "docs/dev_env_info.md" + "docs/src/dev_env_info.md" ] diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..31c4695 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[extras] +Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..a995649 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,17 @@ +# TrixiCUDA.jl is not accessible through Julia's LOAD_PATH currently +push!(LOAD_PATH, "../src/") + +using Documenter +using TrixiCUDA + +# DocMeta.setdocmeta!(TrixiCUDA, :DocTestSetup, :(using TrixiCUDA); recursive = true) + +makedocs(sitename = "TrixiCUDA.jl", + # pages = [ + # "Home" => "index.md" + # ], + format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true")) + +deploydocs(repo = "github.com/trixi-gpu/TrixiCUDA.jl", + devbranch = "main", + push_preview = true) diff --git a/docs/aws_gpu_setup.md b/docs/src/aws_gpu_setup.md similarity index 100% rename from docs/aws_gpu_setup.md rename to docs/src/aws_gpu_setup.md diff --git a/docs/dev_env_info.md b/docs/src/dev_env_info.md similarity index 100% rename from docs/dev_env_info.md rename to docs/src/dev_env_info.md diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..de91950 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1 @@ +# TrixiCUDA.jl \ No newline at end of file diff --git a/docs/nsys_profiling.md b/docs/src/nsys_profiling.md similarity index 100% rename from docs/nsys_profiling.md rename to docs/src/nsys_profiling.md From 3dac0b6fc6a57ca437cbe957755c09544d540aa2 Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Fri, 20 Sep 2024 00:52:04 -0400 Subject: [PATCH 2/4] Fix error --- .github/workflows/CI.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fedd296..3d5ecd5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,27 +52,3 @@ jobs: - uses: codecov/codecov-action@v4 with: file: lcov.info - docs: - name: Documentation - runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }} - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: "1" - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: doctest - using TrixiEnzyme # change MyAwesomePackage to the name of your package - doctest(TrixiEnzyme)' # change MyAwesomePackage to the name of your package - - run: julia --project=docs docs/make.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 From 454eb45f05181651496ca0237dae101104513031 Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Fri, 20 Sep 2024 08:20:53 -0400 Subject: [PATCH 3/4] Fix README.md --- README.md | 3 ++- docs/make.jl | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 35b00b8..43f6548 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # TrixiCUDA.jl -[![Build Status](https://github.com/huiyuxie/TrixiCUDA.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/huiyuxie/TrixiCUDA.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Build status (Github Actions)](https://github.com/trixi-gpu/TrixiCUDA.jl/workflows/CI/badge.svg)](https://github.com/trixi-gpu/TrixiCUDA.jl/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![dev docs](https://img.shields.io/badge/docs-dev-orange.svg)](https://trixi-gpu.github.io/TrixiCUDA.jl/dev) **TrixiCUDA.jl** is a component package of the [**Trixi.jl**](https://github.com/trixi-framework/Trixi.jl) ecosystem and provides GPU acceleration support for solving hyperbolic partial differential equations (PDEs). This package was initialized through the [**Google Summer of Code**](https://summerofcode.withgoogle.com/archive/2023/projects/upstR7K2) program in 2023 and is under active development and testing. diff --git a/docs/make.jl b/docs/make.jl index a995649..445ffb0 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,12 +4,12 @@ push!(LOAD_PATH, "../src/") using Documenter using TrixiCUDA -# DocMeta.setdocmeta!(TrixiCUDA, :DocTestSetup, :(using TrixiCUDA); recursive = true) +DocMeta.setdocmeta!(TrixiCUDA, :DocTestSetup, :(using TrixiCUDA); recursive = true) makedocs(sitename = "TrixiCUDA.jl", - # pages = [ - # "Home" => "index.md" - # ], + pages = [ + "Home" => "index.md" + ], format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true")) deploydocs(repo = "github.com/trixi-gpu/TrixiCUDA.jl", From 67f68e7086df6ee409eecf5402f27c5a5501306a Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Sat, 21 Sep 2024 20:11:53 -1000 Subject: [PATCH 4/4] Add tutorials --- docs/make.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 445ffb0..2a426dc 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -8,7 +8,9 @@ DocMeta.setdocmeta!(TrixiCUDA, :DocTestSetup, :(using TrixiCUDA); recursive = tr makedocs(sitename = "TrixiCUDA.jl", pages = [ - "Home" => "index.md" + "Home" => "index.md", + "Tutorial 1" => "aws_gpu_setup.md", + "Tutorial 2" => "nsys_profiling.md" ], format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"))