Skip to content

support for nimskull in v3 #1475

support for nimskull in v3

support for nimskull in v3 #1475

Workflow file for this run

name: CI
on:
schedule:
- cron: '30 5 * * *'
push:
branches:
- master
paths:
- '**.cfg'
- '**.nims'
- '**.nim'
- '**.nimble'
- 'tests/**'
- '.github/workflows/ci.yml'
pull_request:
branches:
- '*'
paths:
- '**.cfg'
- '**.nims'
- '**.nim'
- '**.nimble'
- 'tests/**'
- '.github/workflows/ci.yml'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
compiler:
- name: nim
version: devel
- name: nim
version: version-1-6
- name: nim
version: version-1-4
- name: nim
version: version-1-2
- name: nim
version: version-1-0
- name: nimskull
version: '*'
exclude:
- os: windows-latest
compiler:
name: nimskull
name: '${{ matrix.os }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ci
- name: Setup Nim
if: matrix.compiler.name == 'nim'
uses: alaviss/[email protected]
with:
path: nim
version: ${{ matrix.compiler.version }}
- name: Setup Nimskull
id: nimskull
if: matrix.compiler.name == 'nimskull'
uses: alaviss/setup-nimskull@f6e8ade8ac51191024616216e5da0ee968d9da48
with:
version: ${{ matrix.compiler.version }}
- if: matrix.compiler.name == 'nimskull'
name: Fetch nimble's fork for nimskull
uses: actions/checkout@v4
with:
path: nimble
repository: alaviss/nimble
ref: nimskull
- if: matrix.compiler.name == 'nimskull'
name: Build nimble and add to PATH
shell: bash
run: |
cd nimble
nim c -d:release -o:nimble src/nimble.nim
cp nimble "$NIMSKULL_BIN/nimble"
# Add nimble binary folder to PATH too
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
env:
NIMSKULL_BIN: ${{ steps.nimskull.outputs.binPath }}
- name: Run tests
shell: bash
run: |
cd ci
#nimble --accept develop
#nimble --accept build
nimble --accept install
nimble test
- name: Build docs
if: ${{ matrix.docs }} == 'true'
shell: bash
run: |
cd ci
branch=${{ github.ref }}
branch=${branch##*/}
nimble doc --project --path="." --outdir:docs \
'--git.url:https://github.com/${{ github.repository }}' \
'--git.commit:${{ github.sha }}' \
"--git.devel:$branch" \
balls.nim
# Ignore failures for older Nim
cp docs/{the,}index.html || true
- name: Publish docs
if: >
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
matrix.os == 'ubuntu-latest' && matrix.compiler.name == 'nim' &&
matrix.compiler.version == 'devel'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: ci/docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}