-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (76 loc) · 2.58 KB
/
testnet.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
name: Deployment to testnet
on:
workflow_dispatch:
schedule:
# This cron expression triggers the workflow at 8:00 UTC every day
- cron: "8 0 * * *"
# uncomment to debug in a PR
# pull_request:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
# see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml
- uses: stellar/actions/rust-cache@main
# pin the rust version: https://github.com/stellar/rs-soroban-sdk/pull/1353
- run: |
rustup default 1.81.0
rustup update
- run: cargo version
- uses: actions/setup-java@v3
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "19"
- name: Install apalache for e2e
run: |
gh release download --repo apalache-mc/apalache --pattern apalache.tgz
tar -xvzf apalache.tgz --directory . > /dev/null
# add apalache-mc to the path, this is a GitHub idiom
echo "`pwd`/apalache/bin" >> $GITHUB_PATH
- name: Install solarkraft for e2e
run: |
cd solarkraft
npm install --dev
npm run compile
npm link
# install stellar
- uses: stellar/stellar-cli@main
with:
version: 22.0.0
- run: stellar --version
- name: Generate Soroban keys
run: |
stellar keys generate --global alice --network testnet --fund
stellar keys generate --global bob --network testnet --fund
stellar keys generate --global admin --network testnet --fund
- name: Build contract examples
run: |
cd ContractExamples
rustup target add wasm32-unknown-unknown
# it's important to disable reference types, otherwise we get deployment errors
RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release
- name: Deploy alert
run: |
cd ContractExamples
./scripts/alert-deploy.sh
- name: Deploy setter
run: |
cd ContractExamples
./scripts/setter-populate.sh
- name: Deploy timelock
run: |
cd ContractExamples
./scripts/prepare-timelock.sh
- name: Deploy xycloans
run: |
cd ContractExamples
./scripts/xycloans-populate.sh
- name: End-to-end tests
run: |
cd solarkraft
npm run e2e