-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (86 loc) · 2.3 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
push:
paths:
- '**.cfg'
- '**.nims'
- '**.nim'
- '**.nimble'
- 'tests/**'
- '.github/workflows/ci.yml'
- '.gitmodules'
# pull_request:
# paths:
# - '**.cfg'
# - '**.nims'
# - '**.nim'
# - '**.nimble'
# - 'tests/**'
# - '.github/workflows/ci.yml'
# - '.gitmodules'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
nim: ['devel']
name: '${{ matrix.os }} (${{ matrix.nim }})'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: dist
- name: Setup Nim
uses: alaviss/[email protected]
with:
path: nim
version: ${{ matrix.nim }}
- name: Run tests
shell: bash
run: |
cd dist
git submodule update --init .
echo "--path=\"\$config\"" > nim.cfg
# just do this manually for now
cd cligen
nimble --accept install
cd ../balls
nimble --accept install
balls
cd ../nimlsp
nimble --accept install
nimble test
cd ../gram
nimble --accept develop
balls
cd ../cps
nimble --accept develop
cd examples
env GITHUB_ACTIONS=false balls --path=".."
cd ..
balls
# - name: Build docs
# if: ${{ matrix.docs }} == 'true'
# shell: bash
# run: |
# cd dist
# branch=${{ github.ref }}
# branch=${branch##*/}
# nimble doc --project --outdir:docs --path="." \
# '--git.url:https://github.com/${{ github.repository }}' \
# '--git.commit:${{ github.sha }}' \
# "--git.devel:$branch" \
# dist.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.nim == 'devel'
# uses: crazy-max/ghaction-github-pages@v1
# with:
# build_dir: dist/docs
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}