This action sets up Nimble (Nim's package manager) in your GitHub Actions workflow.
See action.yml
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.
steps:
- uses: actions/checkout@v4
- uses: nim-lang/setup-nimble-action@v1
with:
nimble-version: 'latest'
repo-token: ${{ secrets.GITHUB_TOKEN }}
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 }}
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 }}
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
MIT