-
Notifications
You must be signed in to change notification settings - Fork 15
122 lines (106 loc) · 3.72 KB
/
algorand-integration.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Algorand-Icon-Integration
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
Algorand-Icon-Integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Relayer
working-directory: ./cmd/iconbridge
run: |
go build .
- name: Build Goloop container
working-directory: ./devnet/docker/goloop
run: docker build -t icon-algorand_goloop .
- name: Run Goloop container
working-directory: ./devnet/docker/goloop
run: |
docker run -d \
--name goloop \
-p 9080:9080 \
-e GOLOOP_NODE_DIR=/goloop/data/goloop \
-e GOLOOP_LOG_WRITER_FILENAME=/goloop/data/log/goloop.log \
-t icon-algorand_goloop
- name: Install Algod and friends
run: |
sudo mkdir /tmp/algorand
sudo wget -O /tmp/algorand/algorand.tar.gz https://github.com/algorand/go-algorand/releases/download/v3.13.3-stable/node_stable_linux-amd64_3.13.3.tar.gz
cd /tmp/algorand
sudo tar xf algorand.tar.gz
cd bin
sudo mv algod goal kmd /usr/local/bin
- name: Run Algod
working-directory: ./devnet/algorand
run: |
goal network create -r /tmp/testnet -t ./template.json
cp ./config.json /tmp/testnet/Node
cp ./algod.token /tmp/testnet/Node
cp ./kmd_config.json /tmp/testnet/Node/kmd-v0.5/kmd_config.json
cp ./kmd.token /tmp/testnet/Node/kmd-v0.5/kmd.token
goal network start -r /tmp/testnet
- name: Run Algorand lifecheck test
run: |
go test -v pyteal/test/lifecheck_test/lifecheck_test.go
- name: Install goloop
run: |
cd /tmp
wget https://github.com/icon-project/goloop/archive/refs/tags/v1.3.3.tar.gz
tar xf v1.3.3.tar.gz
cd goloop-1.3.3/cmd/goloop
go install
cd /tmp
rm -rf goloop-1.3.3 v1.3.3.tar.gz
- name: Install PyTeal
working-directory: ./pyteal
run: |
sudo apt update
sudo apt install -y python3-pip
pip install pyteal
- name: Compile golang tools
working-directory: cmd/tools/algorand
run: ./install-tools.sh
- name: Set up JDK and Gradle
uses: actions/setup-java@v1
with:
java-version: 11
distribution: "gradle"
gradle-version: "7.6"
- name: Test Javascore
working-directory: ./javascore
run: |
./gradlew wrapped-token:test
- name: Build ICON smart contracts
working-directory: ./javascore
run: |
./gradlew dummyBSH:optimizedJar
./gradlew bmc:optimizedJar
./gradlew wrapped-token:optimizedJar
./gradlew test-token:optimizedJar
./gradlew escrow:optimizedJar
- name: Build Algorand smart contracts
working-directory: pyteal
run: |
./build.sh bmc.bmc bmc
./build.sh bsh.bsh bsh
./build.sh escrow.escrow escrow
./build.sh reserve.reserve reserve
- name: Deploy contracts, setup system and update config file
working-directory: ./devnet/docker/icon-algorand
run: |
./setup_system.sh
- name: Start the Relayer
working-directory: ./cmd/iconbridge
run: |
./iconbridge -config=../../devnet/docker/icon-algorand/algo-config.json &
sleep 10
- name: Run integration test
working-directory: ./devnet/docker/icon-algorand
run: |
export PATH=$PATH:~/go/bin
./messaging-bridge-test.sh
./a2i-integration-test.sh
./i2a-integration-test.sh