Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chancyk authored Dec 19, 2024
0 parents commit 8b7d2aa
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Github Actions
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: nimble test -y
- run: nimble test --gc:orc -y
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: docs
on:
push:
branches:
- master
env:
nim-version: 'stable'
nim-src: src/${{ github.event.repository.name }}.nim
deploy-dir: .gh-pages
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.nim-version }}
- run: nimble install -Y
- run: nimble doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }}
- name: "Copy to index.html"
run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html
- name: Deploy documents
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.deploy-dir }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ignore files with no extention:
*
!*/
!*.*

# normal ignores:
*.exe
nimcache
*.pdb
*.ilk
*.out
.*
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2024 Author

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.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# You can use this nim template to jump start your nim library or project.

This template includes:
* MIT licence
* src directory and a private common.nim
* test directory
* GitHub Actions to run the tests on GitHub
1 change: 1 addition & 0 deletions examples/example.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Include an example on how to use your library
8 changes: 8 additions & 0 deletions nimtemplate.nimble
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version = "0.0.0"
author = "Your name"
description = "Description of your library"
license = "MIT"

srcDir = "src"

requires "nim >= 1.2.2"
3 changes: 3 additions & 0 deletions src/nimtemplate.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Public interface to you library.

import nimtemplate/common
1 change: 1 addition & 0 deletions src/nimtemplate/common.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Add private variables or functions here that you don't want to export.
1 change: 1 addition & 0 deletions tests/config.nims
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--path:"../src"
3 changes: 3 additions & 0 deletions tests/test.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Put your tests here.

import nimtemplate

0 comments on commit 8b7d2aa

Please sign in to comment.