-
Notifications
You must be signed in to change notification settings - Fork 33
88 lines (78 loc) · 2.13 KB
/
actions.yaml
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
name: Build
on:
push:
paths-ignore:
- 'LICENSE'
- '*.md'
- 'documents/*.md'
pull_request:
paths-ignore:
- 'LICENSE'
- '*.md'
- 'documents/*.md'
jobs:
skip:
runs-on: ubuntu-latest
steps:
- run: echo "Skip job"
before:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- run: echo "Before job"
build:
name: build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: before
strategy:
matrix:
os:
- ubuntu-latest
# - macOS-latest
# - windows-latest
env:
NIM_VERSION: 1.4.4
steps:
- uses: actions/checkout@v1
- run: |
sudo apt-get update -yqq
sudo apt-get install -y gcc libncursesw5-dev build-essential
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }}
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ env.NIM_VERSION }}
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.NIM_VERSION }}
- name: Install xclip
# Manual install xclip v0.13. Because moe required -r option
run: |
wget http://mirrors.kernel.org/ubuntu/pool/universe/x/xclip/xclip_0.13-1_amd64.deb
sudo dpkg -i xclip_0.13-1_amd64.deb
- name: Install integtation tools
run: |
# shpec
sudo sh -c "`curl -L https://raw.githubusercontent.com/rylnd/shpec/master/install.sh`"
# abduco
wget http://mirrors.kernel.org/ubuntu/pool/universe/a/abduco/abduco_0.1-2_amd64.deb
sudo dpkg -i abduco_0.1-2_amd64.deb
- name: Run unit test
run: |
nimble refresh
script -e -c "xvfb-run nimble test --verbose -Y"
- name: Install moe
run: nimble install --verbose -Y
- name: Run integtation test
run: shpec ./shpec.sh
- name: Build on Nim devel
run: |
choosenim -y devel
nimble build