Skip to content

Commit

Permalink
Set up github workflows (#18)
Browse files Browse the repository at this point in the history
* Set up github workflows
Update related files

* Fix reference to docs imgs

* Adding TagBot github action.
Updating README with link to tutorial
Update make.jl to deploy documents

* Updated ci.yml:  ignoring README & LICENSE
  • Loading branch information
jcampolongo authored Mar 30, 2022
1 parent ede1b7e commit ee49c2e
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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 }}
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
push:
branches:
- main
- develop
tags:
- '*'
paths-ignore:
- 'docs/**'
- 'README.md'
- 'LICENSE'
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
matrix:
version:
- '1.6'
- '1.7'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Documentation
on:
push:
branches:
- main
- develop
tags:
- '*'
pull_request:
jobs:
Documenter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.7'
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
14 changes: 14 additions & 0 deletions .github/workflows/register.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Register Package
on:
workflow_dispatch:
inputs:
version:
description: Version to register or component to bump
required: true
jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/RegisterAction@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![][docs-main-img]][docs-main-url][![][docs-dev-img]][docs-dev-url]  [![][CI-img]][CI-url]  [![][codecov-img]][codecov-url]

# Scruff.jl

Scruff is an AI framework to build agents that sense, reason, and learn in the world using a variety of models. It aims to integrate many different kinds of models in a coherent framework, provide flexibility in spatiotemporal modeling, and provide tools to compose, share, and reuse models and model components.
Expand All @@ -14,6 +16,10 @@ To download the package, from the Julia package manager, run
(v1.7) pkg> add https://github.com/p2t2/Scruff.jl
```

## Scruff Tutorial

The Scruff tutorial can be found at in the [documentation](https://p2t2.github.io/Scruff.jl/main/tutorial/tutorial.html).

## Building the documentation

Scruff uses [Documenter.jl](https://juliadocs.github.io/Documenter.jl/stable/) to generate its documentation. To build, navigate to the `docs` folder and run
Expand All @@ -30,11 +36,25 @@ To run the tests, activate the project as above and just run `test` from the `pk

## Development

The source can be cloned from https://github.com/p2t2/Scruff.jl.git.
Development against the Scruff codebase should _only_ be done by branching the `develop` branch.

### Scruff module layout

The Scruff packages are split into four (4) main modules: `Models`, `Algorithms`, `SFuncs`, and `Operators`.

- To add to the `Models` module, add a `.jl` file to the `src/models/` directory and `include` it in the `src/models.jl` file
- To add to the `Algorithms` module, add a `.jl` file to the `src/algorithms/` directory and `include` it in the `src/algorithms.jl` file
- To add to the `SFuncs` module, add a `.jl` file to the `src/sfuncs/` directory and `include` it in the `src/sfuncs.jl` file
- To add to the `Operators` module, add a `.jl` file to the `src/operators` directory and `include` it in the `src/operators.jl` file

[docs-main-img]: https://img.shields.io/badge/docs-main-blue.svg
[docs-main-url]: https://p2t2.github.io/Scruff.jl/stable

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://p2t2.github.io/Scruff.jl/dev

[CI-img]: https://github.com/p2t2/Scruff.jl/actions/workflows/ci.yml/badge.svg
[CI-url]: https://github.com/p2t2/Scruff.jl/actions/workflows/ci.yml

[codecov-img]: https://codecov.io/gh/p2t2/Scruff.jl/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/p2t2/Scruff.jl
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 = "~0.27.15"
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ makedocs(
]
)

#deploydocs(repo = "github.com/JuliaLang/Example.jl.git")
deploydocs(
repo="github.com/p2t2/Julia.jl.git",
branch_previews = "develop")

0 comments on commit ee49c2e

Please sign in to comment.