Skip to content

Commit

Permalink
Add meta (#1)
Browse files Browse the repository at this point in the history
This PR adds CI, docs, license file, and testing infrastructure.
  • Loading branch information
luraess authored Feb 8, 2024
1 parent e50bd53 commit edd294a
Show file tree
Hide file tree
Showing 25 changed files with 550 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# see: https:/staticfloat/forerunner-buildkite-plugin
steps:
- label: ":runner: Dynamically launch Pipelines"
plugins:
- staticfloat/forerunner:
watch:
- ".buildkite/run_tests.yml"
- ".buildkite/pipeline.yml"
- "**/*.toml"
- "src/**"
- "ext/**"
- "test/**"
target: ".buildkite/run_tests.yml"
agents:
queue: "juliagpu"
56 changes: 56 additions & 0 deletions .buildkite/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
steps:
- label: "CUDA Julia {{matrix.version}}"
matrix:
setup:
version:
- "1.9"
- "1.10"
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.version}}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
julia -e 'println("--- :julia: Instantiating project")
using Pkg
Pkg.develop(; path=pwd())' || exit 3
julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("Chmy"; test_args=["--backend=CUDA"], coverage=true)'
agents:
queue: "juliagpu"
cuda: "*"
timeout_in_minutes: 120
soft_fail:
- exit_status: 3

- label: "AMDGPU Julia {{matrix.version}}"
matrix:
setup:
version:
- "1.10"
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.version}}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
julia -e 'println("--- :julia: Instantiating project")
using Pkg
Pkg.develop(; path=pwd())' || exit 3
julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("Chmy"; test_args=["--backend=AMDGPU"], coverage=true)'
agents:
queue: "juliagpu"
rocm: "*"
rocmgpu: "gfx1101" # select Ludovic's Navi 3 card (ROCm 6.0)
timeout_in_minutes: 120
soft_fail:
- exit_status: 3
env:
JULIA_NUM_THREADS: 4
env:
SECRET_CODECOV_TOKEN: "D2H/GglFTcK7SKyfuO/Fy34xrVWHzXbtGTGQXAA3wpEPNAATGhHO/mIm0ILLzhMZSI1LplJBxJ7nV5WVsky0e/01nbSnW5iB0QqFHK8rD+lXUr4ls4zMlyUa0Lvsl/HixFyhwBtFhy8ruwUsqN8AbJNSJSiF9x4jXhzTgIvlO25/HqQObcfJa6qwcw0m9uMa3K26w1xrPhdE7F4mdUUREjB1W8dzfkKF+vZUeMqYFKgit21uQ9QsRjDJl0ExOEw0SC910rtGHtDO0bpIe+D1nEGQsQr8VEN3o0hOCgTJrya8MFitBqkKeVBV/NUImu4UtxlNb7r0ZrjTawiFle2tfg==;U2FsdGVkX1+sdgrm8OBTX9elIdJMwLMpOvXFFtHrG9lj5J8qDBdbjJDva3XMXkbF6I4PCh9G9NW0pEcF9ghb7g=="
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
patch:
default:
informational: true
project:
default:
informational: true
changes: false
comment: false
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
26 changes: 26 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches:
- lr/doc-ci # update to match your development branch (master, main, dev, trunk, ...)
tags: '*'
pull_request:

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- 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
18 changes: 18 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:

jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
draft: true
68 changes: 68 additions & 0 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Unit Tests
on:
push:
branches:
- main
paths:
- '.github/workflows/UnitTests.yml'
- '**/*.toml'
- 'src/**'
- 'ext/**'
- 'test/**'
pull_request:
paths:
- '.github/workflows/UnitTests.yml'
- '**/*.toml'
- 'src/**'
- 'ext/**'
- 'test/**'
env:
JULIA_NUM_THREADS: 2
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '1' # Latest stable 1.x release of Julia
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
include:
- os: macos-14
arch: "aarch64"
version: "1"
# include:
# - version: 'nightly'
# os: ubuntu-latest
# arch: x64
# allow_failure: true
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # or true if you want CI to fail when Codecov fails
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
docs/build/
docs/site/

Manifest.toml
LocalPreferences.toml

.DS_Store
.vscode
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Pseudo-Transient solvers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Chmy"
uuid = "33a72cf0-4690-46d7-b987-06506c2248b9"
authors = ["Ivan Utkin <[email protected]>"]
authors = ["Ivan Utkin <[email protected]>, Ludovic Raess <[email protected]>, and contributors"]
version = "0.1.0"

[deps]
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h1> <img src="docs/src/assets/logo.png" alt="Chmy.jl" width="30"> Chmy.jl </h1>

[![Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://PTsolvers.github.io/Chmy.jl/dev)
[![CPU CI](https:/PTsolvers/Chmy.jl/actions/workflows/UnitTests.yml/badge.svg)](https:/PTsolvers/Chmy.jl/actions/workflows/UnitTests.yml)
[![GPU CI](https://badge.buildkite.com/3cfbc1f4a0553ce2281925dec2bceba9446bb429286621ec92.svg)](https://buildkite.com/julialang/chmy-dot-jl)
[![codecov](https://codecov.io/gh/PTsolvers/Chmy.jl/graph/badge.svg?token=GMQZHJD807)](https://codecov.io/gh/PTsolvers/Chmy.jl)

Hey, that's Chmy.jl 🚀

## Documentation
Checkout the [documentation](https://PTsolvers.github.io/Chmy.jl/dev) for API reference and usage.

## Funding
The development of this package is supported by the [GPU4GEO](https://ptsolvers.github.io/GPU4GEO/) [PASC](https://www.pasc-ch.org) project.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
site/
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "1"
26 changes: 26 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Documenter
using Chmy

push!(LOAD_PATH,"../src/")

makedocs(
sitename = "Chmy",
authors="Ivan Utkin, Ludovic Räss and contributors",
format = Documenter.HTML(
prettyurls=get(ENV, "CI", nothing) == "true", # easier local build
ansicolor=true
),
modules = [Chmy],
warnonly = [:missing_docs],
pages = Any[
"Home" => "index.md",
"Usage" => Any["usage/runtests.md"],
"Library" => Any["lib/modules.md"]
]
)

deploydocs(
repo = "github.com/PTsolvers/Chmy.jl.git",
devbranch = "lr/doc-ci",
push_preview = true
)
Binary file added docs/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chmy.jl

Documentation for Chmy.jl

Information about the GPU4GEO project can be found on the [GPU4GEO website](https://ptsolvers.github.io/GPU4GEO/)
50 changes: 50 additions & 0 deletions docs/src/lib/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Modules

## Grids

```@autodocs
Modules = [Chmy.Grids]
Order = [:type, :function]
```

## Architectures

```@autodocs
Modules = [Chmy.Architectures]
Order = [:type, :function]
```

## Fields

```@autodocs
Modules = [Chmy.Fields]
Order = [:type, :function]
```

## Grid Operators

```@autodocs
Modules = [Chmy.GridOperators]
Order = [:type, :function]
```

## Boundary Conditions

```@autodocs
Modules = [Chmy.BoundaryConditions]
Order = [:type, :function]
```

## Distributed

```@autodocs
Modules = [Chmy.Distributed]
Order = [:type, :function]
```

## Workers

```@autodocs
Modules = [Chmy.Workers]
Order = [:type, :function]
```
Loading

0 comments on commit edd294a

Please sign in to comment.