Skip to content

Fix sqrt to simplify to base units, add simplify to turn unit into SI base units #260

Fix sqrt to simplify to base units, add simplify to turn unit into SI base units

Fix sqrt to simplify to base units, add simplify to turn unit into SI base units #260

Workflow file for this run

name: unchained CI
on:
push:
paths:
- 'examples/**'
- 'src/**'
- 'tests/**'
- 'unchained.nimble'
- '.github/workflows/ci.yml'
branches:
- 'master'
pull_request:
paths:
- 'examples/**'
- 'src/**'
- 'tests/**'
- 'unchained.nimble'
- '.github/workflows/ci.yml'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
nim:
- '1.6.x'
- '2.2.x'
- 'devel'
os:
- ubuntu-latest
- windows-latest
- macOS-latest
name: '${{ matrix.nim }} (${{ matrix.os }})'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: unchained
- name: Setup nim
uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MSYS2 (Windows)
if: ${{matrix.target == 'windows'}}
uses: msys2/setup-msys2@v2
with:
path-type: inherit
update: true
install: base-devel git mingw-w64-x86_64-toolchain
- name: Install test dependencies (OSX)
if: ${{matrix.target == 'macos'}}
run: |
brew install imagemagick cairo
- name: Install test dependencies (Windows)
if: ${{matrix.target == 'windows'}}
shell: msys2 {0}
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-x86_64-cairo
pacman -S --needed --noconfirm mingw-w64-x86_64-lapack
- name: Setup nimble & deps
shell: bash
run: |
cd unchained
nimble refresh -y
nimble install -y
nimble installTestDeps
- name: Run tests (Linux & Mac)
if: ${{matrix.target != 'windows'}}
shell: bash
run: |
cd unchained
nimble -y test
- name: Run tests (Windows)
if: ${{matrix.target == 'windows'}}
shell: msys2 {0}
run: |
cd unchained
nimble -y test
- name: Build docs
if: >
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
matrix.target == 'linux' && matrix.branch == 'devel'
shell: bash
run: |
cd unchained
# **HAVE** to call `develop`, cuz we're getting screwed by
# logic otherwise
nimble develop -y
nimble gen_docs
# TODO: fix this, need to iterate over all files, do similar to arraymancer docs
# 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.target == 'linux' && matrix.branch == 'devel'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: unchained/docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}