-
Notifications
You must be signed in to change notification settings - Fork 6
100 lines (94 loc) · 3.42 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
name: Build
on: push
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: >
<:kolibri:790471932025372693> [[{{ SHORT_SHA }}](https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ SHORT_SHA }})] [Starting Kolibri Contracts build...](https://github.com/{{ GITHUB_REPOSITORY }}/actions/runs/{{ GITHUB_RUN_ID }}?check_suite_focus=true)
```${{ github.event.head_commit.message }}```
build_and_test_smart_contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- name: "Install Dependencies"
run: |
sudo apt-get update && sudo apt-get install make
- name: "Install SmartPy"
run: |
curl -s https://smartpy.io/releases/20211106-51985c20a6a77e31b6de0d3b0400cccce74e38ad/cli/install.sh | sh -s -- local-install ~/smartpy-cli
- name: "Build and Test Smart Contracts"
run: |
cd smart_contracts
./compile.sh
make all
lint_and_build_deploy_scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
node-version: '14.17.6'
- uses: actions/setup-node@v2
- name: "Install Dependencies"
run: |
sudo apt-get update && sudo apt-get install build-essential git libusb-1.0-0 libusb-1.0-0-dev libudev-dev
- name: "Build and lint deploy scripts"
run: |
cd deploy
npm i
npm run lint
npm run build
build_contracts_1_1_migration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.17.6'
- name: "Install Dependencies"
run: |
sudo apt-get update && sudo apt-get install build-essential git libusb-1.0-0 libusb-1.0-0-dev libudev-dev
- name: "Build and lint deploy scripts"
run: |
cd migrations/contracts-1.1
npm i
build_contracts_1_2_migration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.17.6'
- name: "Install Dependencies"
run: |
sudo apt-get update && sudo apt-get install build-essential git libusb-1.0-0 libusb-1.0-0-dev libudev-dev
- name: "Build and lint deploy scripts"
run: |
cd migrations/contracts-1.2
npm i
notify_complete:
runs-on: ubuntu-latest
needs:
- notify_init
- build_and_test_smart_contracts
- lint_and_build_deploy_scripts
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: >
<:kolibri:790471932025372693> [[{{ SHORT_SHA }}](https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ SHORT_SHA }})] [Kolibri Contracts built successfully!](https://github.com/{{ GITHUB_REPOSITORY }}/actions/runs/{{ GITHUB_RUN_ID }}?check_suite_focus=true)
```${{ github.event.head_commit.message }}```