Skip to content

Set up your GitHub Actions workflow with a specific version of Nim

License

Notifications You must be signed in to change notification settings

nim-lang/setup-nimble-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-nimble-action

Build Status

This action sets up Nimble (Nim's package manager) in your GitHub Actions workflow.

Usage

See action.yml

Basic usage

steps:
  - uses: actions/checkout@v4
  - uses: nim-lang/setup-nimble-action@v1
    with:
      nimble-version: '0.16.4' # default is 'latest'
      repo-token: ${{ secrets.GITHUB_TOKEN }}

repo-token is used for Rate limiting. It works without setting this parameter, but please set it if you get rate limit errors.

Setup latest version

steps:
  - uses: actions/checkout@v4
  - uses: nim-lang/setup-nimble-action@v1
    with:
      nimble-version: 'latest'
      repo-token: ${{ secrets.GITHUB_TOKEN }}

Cache usage

steps:
  - uses: actions/checkout@v4
  - name: Cache nimble
    id: cache-nimble
    uses: actions/cache@v4
    with:
      path: ~/.nimble
      key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
      restore-keys: |
        ${{ runner.os }}-nimble-
    if: runner.os != 'Windows'
  - uses: nim-lang/setup-nimble-action@v1
    with:
      repo-token: ${{ secrets.GITHUB_TOKEN }}

Matrix testing usage

Test across multiple platforms:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macOS-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nim-lang/setup-nimble-action@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

Change Nimble installation directory

The action installs Nimble to .nimble_runtime directory by default. You can change this using:

  - uses: nim-lang/setup-nimble-action@v1
    with:
      nimble-version: latest
      repo-token: ${{ secrets.GITHUB_TOKEN }}
      nimble-install-directory: custom_dir

License

MIT

About

Set up your GitHub Actions workflow with a specific version of Nim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%