-
Notifications
You must be signed in to change notification settings - Fork 42
135 lines (123 loc) · 4.47 KB
/
ci-tempo.yml
File metadata and controls
135 lines (123 loc) · 4.47 KB
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
name: CI Tempo
permissions: {}
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
inputs:
network:
description: "Tempo network to check"
required: true
type: choice
options:
- testnet
- devnet
- mainnet
- all
scripts:
description: "Which scripts to run"
required: false
type: choice
default: "both"
options:
- check
- deploy
- both
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"
jobs:
sanity-check:
runs-on: depot-ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
steps:
# Checkout the repository
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable
- uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
# Build and install binaries
- name: Build and install Foundry binaries
run: |
cargo install --path ./crates/forge --profile dev --force --locked
cargo install --path ./crates/cast --profile dev --force --locked
cargo install --path ./crates/anvil --profile dev --force --locked
cargo install --path ./crates/chisel --profile dev --force --locked
- name: Run MPP e2e test
if: github.event_name == 'push' || github.event_name == 'pull_request'
env:
TEMPO_KEYS_TOML_B64: ${{ secrets.TEMPO_KEYS_TOML_B64 }}
MPP_DEPOSIT: "1000000"
run: |
if [ -z "${TEMPO_KEYS_TOML_B64:-}" ]; then
echo "::warning::TEMPO_KEYS_TOML_B64 secret not set, skipping MPP e2e"
exit 0
fi
mkdir -p ~/.tempo/wallet
echo "$TEMPO_KEYS_TOML_B64" | tr -d '[:space:]' | base64 -d > ~/.tempo/wallet/keys.toml
./.github/scripts/tempo-mpp.sh "$(which cast | xargs dirname)"
- name: Run Tempo check on devnet
if: |
github.event_name == 'pull_request' ||
github.event.inputs.network == 'devnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }}
SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
run: |
if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-check.sh
fi
if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-deploy.sh
fi
- name: Run Tempo wallet tests on devnet
if: |
github.event_name == 'pull_request' ||
github.event.inputs.network == 'devnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }}
run: ./.github/scripts/tempo-wallet.sh
- name: Run Tempo check on testnet
if: |
github.event.inputs.network == 'testnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_TESTNET_RPC_URL }}
VERIFIER_URL: ${{ secrets.VERIFIER_URL }}
SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
run: |
if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-check.sh
fi
if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-deploy.sh
fi
- name: Run Tempo check on mainnet
if: |
github.event.inputs.network == 'mainnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_MAINNET_RPC_URL }}
TEMPO_FEE_TOKEN: "0x20c0000000000000000000000000000000000000"
VERIFIER_URL: ${{ secrets.VERIFIER_URL }}
PRIVATE_KEY: ${{ secrets.THROW_AWAY_MAINNET_PKEY }}
SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
run: |
if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-check.sh
fi
if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-deploy.sh
fi