-
Notifications
You must be signed in to change notification settings - Fork 6
105 lines (91 loc) · 3.35 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
98
99
100
101
102
103
104
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
notify_init:
runs-on: ubuntu-latest
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Discord notification PR
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: >
:lock_with_ink_pen: [[{{ SHORT_SHA }}](<https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ SHORT_SHA }}>)] [Starting Tezos Multisig build...](<https://github.com/{{ GITHUB_REPOSITORY }}/actions/runs/{{ GITHUB_RUN_ID }}?check_suite_focus=true>)
```${{ github.event.head_commit.message }}```
cli_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cli
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v2
id: node-cache
with:
path: cli/node_modules
key: cli-node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies (if the cached directory was not found)
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm ci
lib_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v2
id: node-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies (if the cached directory was not found)
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm ci
smart_contracts_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./smart_contracts
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- name: "Install SmartPy"
run: |
curl https://smartpy.io/releases/20210118-6f466eee56038df8fda8b2f77819b83398346296/cli/install.sh | sh -s -- local-install ~/smartpy-cli
- name: "Build and Test Smart Contracts"
run: |
./compile.sh
notify_complete:
runs-on: ubuntu-latest
needs:
- notify_init
- smart_contracts_build
- cli_build
- lib_build
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Discord notification PR
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: >
:lock_with_ink_pen: [[{{ SHORT_SHA }}](<https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ SHORT_SHA }}>)] [Tezos Multisig built successfully!](<https://github.com/{{ GITHUB_REPOSITORY }}/actions/runs/{{ GITHUB_RUN_ID }}?check_suite_focus=true>)
```${{ github.event.head_commit.message }}```