2023-03-13 10:42:12 +00:00
|
|
|
name: Nim
|
2023-03-08 13:04:30 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2023-03-13 10:42:12 +00:00
|
|
|
tests:
|
2023-03-08 13:04:30 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
- macOS-latest
|
|
|
|
nim-version:
|
|
|
|
- stable
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Cache choosenim
|
|
|
|
id: cache-choosenim
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.choosenim
|
|
|
|
key: ${{ runner.os }}-choosenim-${{ matrix.nim-version}}
|
|
|
|
|
|
|
|
- name: Cache nimble
|
|
|
|
id: cache-nimble
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.nimble
|
|
|
|
key: ${{ runner.os }}-nimble-${{ matrix.nim-version}}-${{ hashFiles('bindings/nim/kzg_abi.nim') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-nimble-${{ matrix.nim-version }}
|
|
|
|
|
|
|
|
- name: Setup nim
|
|
|
|
uses: jiro4989/setup-nim-action@v1
|
|
|
|
with:
|
|
|
|
nim-version: ${{ matrix.nim-version }}
|
|
|
|
|
|
|
|
- name: Install Packages
|
|
|
|
run: |
|
|
|
|
nimble install -y stew
|
|
|
|
nimble install -y unittest2
|
|
|
|
nimble install -y yaml
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
cd bindings/nim
|
|
|
|
nim test
|