Modify actions and add rename script
This commit is contained in:
parent
a7f0b68f28
commit
022caac51c
2 changed files with 57 additions and 8 deletions
54
.github/workflows/build.yml
vendored
54
.github/workflows/build.yml
vendored
|
|
@ -1,16 +1,54 @@
|
||||||
name: Github Actions
|
name: Github Actions
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
version:
|
||||||
runs-on: ${{ matrix.os }}
|
- stable
|
||||||
|
- devel
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository and submodules
|
||||||
- uses: jiro4989/setup-nim-action@v1
|
uses: actions/checkout@v2
|
||||||
- run: nimble test -y
|
with:
|
||||||
- run: nimble test --gc:orc -y
|
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@v3.2.1
|
||||||
|
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
|
||||||
|
- name: Run install
|
||||||
|
run: nimble install -Y
|
||||||
|
- name: Run tests
|
||||||
|
run: nimble test -y
|
||||||
|
- name: Run tests orc
|
||||||
|
run: nimble test --gc:orc -y
|
||||||
|
|
|
||||||
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
|
||||||
|
|
||||||
|
mv src/nimtemplate src/$PROJECT_NAME
|
||||||
|
mv src/nimtemplate.nim src/$PROJECT_NAME.nim
|
||||||
|
|
||||||
|
mv nimtemplate.nimble $PROJECT_NAME.nimble
|
||||||
Loading…
Add table
Add a link
Reference in a new issue