forked from cosmos/relayer
-
Notifications
You must be signed in to change notification settings - Fork 2
156 lines (127 loc) · 4.82 KB
/
test-relay.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Deploy Relayer Locally
on:
push:
branches:
- "main"
jobs:
relay-local-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
# Install and setup go
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
# setup gopath
- name: Set PATH
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
# Install rust toolchain
# - name: Install rust stable toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: 1.69.0
# target: wasm32-unknown-unknown
# override: true
# profile: minimal
# - name: Cache Rust dependencies
# uses: Swatinem/rust-cache@v2
# Build relay
- name: Build relayer
run: make install
# Install goloop
- name: Install goloop
run: go install github.com/icon-project/goloop/cmd/goloop@latest
# Build archwayd
- name: Build archwayd
working-directory: .github/scripts/archway
run: |
echo $PWD
echo $GITHUB_WORKSPACE
make install
# Build comsmwasm
# - name: Compile WASM
# working-directory: .github/scripts/IBC-Integration
# run: |
# rustup component add rustfmt --toolchain 1.69.0-x86_64-unknown-linux-gnu
# rustup component add clippy --toolchain 1.69.0-x86_64-unknown-linux-gnu
# bash ./optimize_build.sh
# - name: Build javascore
# working-directory: .github/scripts/IBC-Integration/contracts/javascore
# run: |
# ./gradlew clean build
# ./gradlew optimizedJar
- name: Fetch Latest IBC-Integration Tag
id: fetch_ibc_tag
run: |
TAG_IBC=$(curl -s "https://api.github.com/repos/icon-project/IBC-Integration/tags" | jq -r '.[0].name')
echo "TAG_IBC=$TAG_IBC" >> $GITHUB_ENV
- name: Fetch Latest XCALL Tag
id: fetch_xcall_tag
run: |
TAG_XCALL=$(curl -s "https://api.github.com/repos/icon-project/xCall/tags" | jq -r '.[0].name')
echo "TAG_XCALL=$TAG_XCALL" >> $GITHUB_ENV
- name: Get Latest tag - IBC-Integration
id: ibc_tag
run: echo "tag=$(curl -s "https://api.github.com/repos/icon-project/IBC-Integration/tags" | jq -r '.[0].name')" >> $GITHUB_OUTPUT
- name: Get Latest tag - xCall
id: xcall_tag
run: echo "tag=$(curl -s "https://api.github.com/repos/icon-project/xCall/tags" | jq -r '.[0].name')" >> $GITHUB_OUTPUT
- name: Download IBC Core Javascore Contracts
uses: robinraju/[email protected]
with:
repository: "icon-project/IBC-Integration"
tag: "${{ steps.ibc_tag.outputs.tag }}"
# latest: true
fileName: "*.jar"
out-file-path: "./.github/scripts/IBC-Integration/artifacts/icon"
- name: Download IBC Core Cosmwasm Contracts
uses: robinraju/[email protected]
with:
repository: "icon-project/IBC-Integration"
tag: "${{ steps.ibc_tag.outputs.tag }}"
# latest: true
fileName: "*.wasm"
out-file-path: "./.github/scripts/IBC-Integration/artifacts/archway"
- name: Download xCall Javascore Contracts
uses: robinraju/[email protected]
with:
repository: "icon-project/xCall"
tag: "${{ steps.xcall_tag.outputs.tag }}"
# latest: true
fileName: "*.jar"
out-file-path: "./.github/scripts/IBC-Integration/artifacts/icon"
- name: Download xCall Cosmwasm Contracts
uses: robinraju/[email protected]
with:
repository: "icon-project/xCall"
tag: "${{ steps.xcall_tag.outputs.tag }}"
# latest: true
fileName: "*.wasm"
out-file-path: "./.github/scripts/IBC-Integration/artifacts/archway"
- name: List Download Files
run: |
ls -l ${GITHUB_WORKSPACE}/.github/scripts/IBC-Integration/artifacts/icon
ls -l ${GITHUB_WORKSPACE}/.github/scripts/IBC-Integration/artifacts/archway
echo $HOME
echo $PWD
echo $GITHUB_WORKSPACE
echo "${GITHUB_REF##*/}"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
fingerprint: "C787AB518A0C08B7AE1E1ADA2809A1A84E32159A"
trust_level: 5
- name: start relay
working-directory: .github/scripts
run: bash ./start_relay.sh