-
-
Notifications
You must be signed in to change notification settings - Fork 89
84 lines (64 loc) · 2.3 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
if: |
!contains(github.event.head_commit.message, '[skip ci]')
strategy:
fail-fast: true
matrix:
platform: [ubuntu-latest]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
architecture: ["x64", "x86"]
nim-channel: [stable, devel]
name: ${{ matrix.platform }}-${{ matrix.architecture }}-${{ matrix.python-version }}-${{ matrix.nim-channel }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set Environment Variables
uses: allenevans/[email protected]
with:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
CMD: "nim doc -d:nimStrictDelete -d:nimPreviewFloatRoundtrip -d:nimPreviewDotLikeOps --gc:orc --index:on --project --experimental:strictEffects --experimental:strictFuncs --styleCheck:usages --styleCheck:hint --outdir:../../docs"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: jiro4989/[email protected]
with:
nim-version: ${{ matrix.nim-channel }}
no-color: true
- name: Get Git Commit Short Hash
id: vars
shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "semver_date=$(date +'%y.%m.%d')" >> $GITHUB_ENV
- name: Nimble Install dependencies
run: |
nimble -y refresh
nimble -y install nimpy
pip install nimporter
- name: Build docs
shell: bash
run: |
cd faster_than_requests/
for i in *.nim; do
$CMD $i
done
- name: Clean out
shell: bash
run: |
rm --verbose --force --recursive docs/*.idx
rm --verbose --force --recursive docs/nimcache/*.*
rm --verbose --force --recursive docs/nimcache/runnableExamples/*.*
- name: Commit Docs
if: |
github.event_name == 'push' && runner.os == 'Linux' &&
matrix.platform == 'ubuntu-latest' && matrix.architecture == 'x64' && matrix.python-version == '3.10'
uses: EndBug/add-and-commit@v4 # Commit everything to Git repo
with:
add: 'docs'
force: true
message: 'Fully Automated Luxury Nim'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}