Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Setup Nim environment

v1.0.2

Setup Nim environment

play

Setup Nim environment

Setup a Nim environment and add it to the PATH

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup Nim environment

uses: jiro4989/[email protected]

Learn more about this action in jiro4989/setup-nim-action

Choose a version

setup-nim-action

Build Status

This action sets up a Nim environment.

Usage

See action.yml

Basic:

steps:
- uses: actions/checkout@master
- uses: jiro4989/[email protected]
  with:
    nim-version: '1.0.2'
- run: nimble build -Y
- run: nimble test -Y

Use cache:

steps:
- uses: actions/checkout@master
- 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
- uses: jiro4989/[email protected]
- run: nimble build -Y
- run: nimble test -Y

Matrix Testing:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        nim: [ '1.0.2', 'stable' ]
    name: Nim ${{ matrix.nim }} sample
    steps:
      - uses: actions/checkout@master
      - name: Setup nim
        uses: jiro4989/[email protected]
        with:
          nim-version: ${{ matrix.nim }}
      - run: nimble build

License

MIT