diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1052ef0..2d27bb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,54 @@ name: Github Actions -on: [push, pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] - - runs-on: ${{ matrix.os }} + os: [ubuntu-latest, windows-latest, macOS-latest] + version: + - stable + - devel steps: - - uses: actions/checkout@v2 - - uses: jiro4989/setup-nim-action@v1 - - run: nimble test -y - - run: nimble test --gc:orc -y + - 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@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 diff --git a/rename.bash b/rename.bash new file mode 100755 index 0000000..03accf9 --- /dev/null +++ b/rename.bash @@ -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