-
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (74 loc) · 1.91 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
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']
os: ['macos-latest']
nim: ['devel']
name: '${{ matrix.os }} (${{ matrix.nim }})'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ci
- name: Setup Nim
uses: alaviss/setup-nim@0.1.1
with:
path: nim
version: ${{ matrix.nim }}
- name: Run tests
shell: bash
run: |
cd ci
nimble --accept develop
#nimble --accept install "https://github.com/disruptek/balls"
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" \
supervisors.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 == 'macos-latest' && matrix.nim == 'devel'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: ci/docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}