forked from anoma/namada
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (124 loc) · 4.78 KB
/
triggerable_sync.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
123
124
125
126
127
128
name: Triggerable chain sync test
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true
type: string
binaries_name:
description: 'Binaries file name without extension (e.g. for branch with open PR #2535, the binaries name is `binaries-2535`)'
required: true
type: string
chain_id:
description: 'Chain ID'
required: true
type: string
seed_nodes:
description: "An optional list of seed node addresses (comma separated with no whitespace) to add to Comet's P2P config (must be a valid `TendermintAddress`es, e.g. `tcp://[email protected]:26656`)."
required: false
default: ''
type: string
env:
RUSTC_WRAPPER: sccache
SCCACHE_S3_USE_SSL: ${{ secrets.CACHE_SSL }}
GIT_LFS_SKIP_SMUDGE: 1
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
SCCACHE_BUCKET: namada-cache
SCCACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.CACHE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHE_SECRET_KEY }}
AWS_REGION: us-east-1
jobs:
test-sync:
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.timeout }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
nightly_version: [nightly-2024-02-20]
mold_version: [2.4.0]
comet_bft: [0.37.2]
name: ["Run chain sync test"]
timeout: [360]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Get latest commit SHA
run: |
git fetch origin ${{ inputs.branch }}
echo "COMMIT_SHA=$(git rev-parse origin/${{ inputs.branch }})" >> $GITHUB_ENV
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev
- name: Install Protoc
uses: heliaxdev/setup-protoc@v2
with:
version: "25.0"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Setup rust toolchain
uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Download namada release binaries
run: |
unset AWS_SESSION_TOKEN
aws --endpoint-url $S3_ENDPOINT_URL s3 cp s3://$BUCKET_NAME/$ZIP_FILENAME $ZIP_FILENAME --region $AWS_REGION
unzip $ZIP_FILENAME
env:
BUCKET_NAME: namada-binaries
AWS_REGION: us-east-1
S3_ENDPOINT_URL: https://minio.heliax.click
ZIP_FILENAME: "${{ inputs.binaries_name }}.zip"
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_KEY }}
- name: Download CometBFT
run: |
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v${{ matrix.comet_bft }}/cometbft_${{ matrix.comet_bft }}_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
mv cometbft /usr/local/bin
- name: Run the test
run: cargo +${{ matrix.nightly_version }}
test e2e::ledger_tests::test_sync_chain -- --exact --ignored
env:
NAMADA_E2E_USE_PREBUILT_BINARIES: "true"
NAMADA_E2E_KEEP_TEMP: "true"
NAMADA_LOG_COLOR: "false"
NAMADA_SEED_NODES: "${{ inputs.seed_nodes }}"
NAMADA_CHAIN_ID: "${{ inputs.chain_id }}"
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload logs
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: logs-sync-${{ env.COMMIT_SHA }}
path: |
/tmp/.*/logs/
/tmp/.*/setup/validator-*/logs/
/tmp/.*/setup/valiator-*/e2e-test.*/*.toml
retention-days: 5
- name: Stats sccache server
run: sccache --show-stats || true
- name: Start sccache server
run: sccache --stop-server || true