generated from openpeeps/pistachio
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (61 loc) · 1.95 KB
/
test.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
name: test
on:
push:
paths-ignore:
- LICENSE
- README.*
- examples
- editors
- package.json
pull_request:
paths-ignore:
- LICENSE
- README.*
- examples
- editors
- package.json
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
nim-version:
- 'stable'
os:
- ubuntu-latest
# - windows-latest
# - macOS-latest
- macos-13 # building on arm64 fails
steps:
- uses: actions/checkout@v2
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
# - run: sudo apt-get -y install libsass-dev
- run: "npm install cmake-js -g"
- run: "choosenim show path -y"
- run: nimble install -Y
- run: nimble test
- run: denim build src/${{ github.event.repository.name }}.nim -r -y --cmake
- name: "update tim.node"
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
timNodeName="tim-$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]').node"
git pull origin main
git checkout .
if test -f ./bindings/node/tim/src/bin/$timNodeName; then
rm -f ./bindings/node/tim/src/bin/$timNodeName
git add ./bindings/node/tim/src/bin/$timNodeName
git commit -m "cleanup previous tim.node"
fi
cp ./bin/tim.node ./bindings/node/tim/src/bin/$timNodeName
git status
git add ./bindings/node/tim/src/bin/$timNodeName
git commit -m "update tim for node on ${{ runner.os }}"
- name: Push changes # push the output folder to your repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'main'