Initial commit
This commit is contained in:
commit
c2c19fffd5
11 changed files with 111 additions and 0 deletions
55
.github/workflows/build.yml
vendored
Normal file
55
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
name: Github Actions
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
version:
|
||||||
|
- stable
|
||||||
|
- devel
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository and submodules
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Cache choosenim
|
||||||
|
id: cache-choosenim
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.choosenim
|
||||||
|
key: ${{ runner.os }}-choosenim-stable
|
||||||
|
|
||||||
|
- name: Cache nimble
|
||||||
|
id: cache-nimble
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.nimble
|
||||||
|
key: ${{ runner.os }}-nimble-stable
|
||||||
|
|
||||||
|
- name: Setup Nim
|
||||||
|
uses: iffy/install-nim@v4.1.3
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
|
||||||
|
- name: Print Nim version
|
||||||
|
run: nim -v
|
||||||
|
- name: Print Nimble version
|
||||||
|
run: nimble -v
|
||||||
|
- name: Nimble build
|
||||||
|
run: nimble build -Y --verbose
|
||||||
|
- name: Run install
|
||||||
|
run: nimble install -Y
|
||||||
|
- name: Run tests
|
||||||
|
run: nimble test -y
|
||||||
|
- name: Run tests orc
|
||||||
|
run: nimble test --mm:orc -y
|
||||||
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# ignore files with no extention:
|
||||||
|
*
|
||||||
|
!*/
|
||||||
|
!*.*
|
||||||
|
|
||||||
|
# normal ignores:
|
||||||
|
*.exe
|
||||||
|
nimcache
|
||||||
|
*.pdb
|
||||||
|
*.ilk
|
||||||
|
.*
|
||||||
9
LICENSE
Normal file
9
LICENSE
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2021 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
README.md
Normal file
7
README.md
Normal file
|
|
@ -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
examples/example.nim
Normal file
1
examples/example.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
## Include an example on how to use your library
|
||||||
9
nimtemplate.nimble
Normal file
9
nimtemplate.nimble
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
version = "0.0.0"
|
||||||
|
author = "Your name"
|
||||||
|
description = "Description of your library"
|
||||||
|
license = "MIT"
|
||||||
|
|
||||||
|
srcDir = "src"
|
||||||
|
bin = @["nimtemplate"]
|
||||||
|
|
||||||
|
requires "nim >= 1.2.2"
|
||||||
11
rename.bash
Executable file
11
rename.bash
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PROJECT_NAME="$1"
|
||||||
|
echo $PROJECT_NAME
|
||||||
|
|
||||||
|
sed -i.bak "s/nimtemplate/$PROJECT_NAME/g" tests/test.nim src/nimtemplate.nim nimtemplate.nimble
|
||||||
|
|
||||||
|
mv src/nimtemplate src/$PROJECT_NAME
|
||||||
|
mv src/nimtemplate.nim src/$PROJECT_NAME.nim
|
||||||
|
|
||||||
|
mv nimtemplate.nimble $PROJECT_NAME.nimble
|
||||||
3
src/nimtemplate.nim
Normal file
3
src/nimtemplate.nim
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
## Public interface to you library.
|
||||||
|
|
||||||
|
import nimtemplate/common
|
||||||
1
src/nimtemplate/common.nim
Normal file
1
src/nimtemplate/common.nim
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
## Add private variables or functions here that you don't want to export.
|
||||||
1
tests/config.nims
Normal file
1
tests/config.nims
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
--path:"../src"
|
||||||
3
tests/test.nim
Normal file
3
tests/test.nim
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
## Put your tests here.
|
||||||
|
|
||||||
|
import nimtemplate
|
||||||
Loading…
Add table
Add a link
Reference in a new issue