https://github.com/alaviss/setup-nim
CI helpers to setup Nim using prebuilt nightlies
https://github.com/alaviss/setup-nim
Last synced: 4 months ago
JSON representation
CI helpers to setup Nim using prebuilt nightlies
- Host: GitHub
- URL: https://github.com/alaviss/setup-nim
- Owner: alaviss
- License: gpl-3.0
- Created: 2020-10-25T02:05:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T17:44:09.000Z (almost 5 years ago)
- Last Synced: 2025-05-21T23:47:16.045Z (5 months ago)
- Language: Shell
- Size: 250 KB
- Stars: 21
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Setup Nim

An action for setting up the Nim environment for use within Github Actions.
This includes:- The full Nim toolchain built by the official builder at
[nim-lang/nightlies](https://github.com/nim-lang/nightlies).
- A [problem matcher](https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md)
for converting compiler errors/warnings into annotations.# Usage
See [action.yml](action.yml)
**Note**: It is recommended to use a tagged version at the moment instead of
`master`. This makes sure that future backward-incompatible changes will not
cause your CI to fail suddenly. See the [Update](#update) section for how
to keep the action up-to-date.Basic:
```yaml
steps:
- uses: alaviss/setup-nim@0.1.1
with:
version: 'version-1-4' # The Nim nightly version branch to download
path: 'nim' # The directory relative to ${{ github.workspace }} to
# store the downloaded toolchain
- uses: actions/checkout@v2
- run: nimble build
```Matrix testing:
```yaml
jobs:
test:
strategy:
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
nim: ['devel', 'version-1-4', 'version-1-0']name: Nim ${{ matrix.nim }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: alaviss/setup-nim@0.1.1
with:
path: 'nim'
version: ${{ matrix.nim }}
- run: nimble test
```Testing 32bit Windows:
```yaml
jobs:
test:
name: Nim 32bit on Windows
runs-on: windows-lateststeps:
- uses: actions/checkout@v2
- uses: egor-tensin/setup-mingw@v1
with:
platform: x86
- uses: alaviss/setup-nim@0.1.1
with:
path: 'nim'
version: devel
architecture: i386
- run: nimble test
```# Update
Github's Dependabot can be used to keep actions up-to-date, see [here][1] for
more information.Example `.github/dependabot.yml` (copied from [Github Docs][1]):
```yaml
version: 2updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
```# License
Unless stated otherwise, scripts and documentations within this project are
released under the [GNU GPLv3 license](license.txt).[1]: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot