-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
143 lines (134 loc) · 4.33 KB
/
.gitlab-ci.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
stages:
- test
- build
clippy-and-docs:
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo clippy --all-features --all-targets --locked -- -D warnings
- RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps --locked
fmt:
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo fmt -- --check
test:
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo test --all --all-targets --locked
test-features:
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo test --all --all-features --all-targets --locked
build:
timeout: 2 hours
image:
name: kiltprotocol/kilt-ci:2.7.31
entrypoint: [""]
stage: build
only:
refs:
- develop
- master
- /^[0-9]+(?:\.[0-9]+){2}(?:-(rc)*([0-9])+)?$/
- /^[dev-](\w*-)*[0-9]?$/
variables:
DOCKER_HUB_PARACHAIN: "kiltprotocol/kilt-node"
DOCKER_HUB_STANDALONE: "kiltprotocol/standalone-node"
DOCKER_HUB_DIP_PROVIDER_TEMPLATE: "kiltprotocol/dip-provider-node-template"
DOCKER_HUB_DIP_CONSUMER_TEMPLATE: "kiltprotocol/dip-consumer-node-template"
before_script:
- aws --version
- docker --version
script:
- echo -n $CI_REGISTRY_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
- aws ecr get-login-password | docker login --username AWS --password-stdin $AWS_REGISTRY
- ./.maintain/docker-auth-config.sh
- ./.maintain/build-image.sh build
- "if [[ ! -z ${CI_COMMIT_BRANCH} ]]; then ./.maintain/push-image.sh build ${CI_COMMIT_SHORT_SHA}; fi"
- "if [[ ! -z ${CI_COMMIT_BRANCH} ]]; then ./.maintain/push-image.sh build latest-${CI_COMMIT_BRANCH}; fi"
- "if [[ ! -z ${CI_COMMIT_TAG} ]]; then ./.maintain/push-image.sh build ${CI_COMMIT_TAG}; fi"
- "if [[ ! -z ${CI_COMMIT_TAG} && ! -z ${CI_COMMIT_TAG##*-rc*} && ! -z ${CI_COMMIT_TAG##*dev-*} ]]; then ./.maintain/push-image.sh build latest; fi"
build-wasm-peregrine:
image:
name: paritytech/srtool:1.70.0
entrypoint: [""]
stage: build
only:
- develop
- master
- /^[0-9]+(?:\.[0-9]+){2}(?:-(rc)*([0-9])+)?$/
script:
- export PACKAGE=peregrine-runtime
- export RUNTIME_DIR=runtimes/peregrine
- export PARACHAIN_PALLET_ID=0x50
- export AUTHORIZE_UPGRADE_PREFIX=0x02
- cp -r * /build
- /srtool/build build
- subwasm meta --format=json+scale /out/peregrine_runtime.compact.wasm > /out/peregrine-metadata.json
- subwasm get -o peregrine-live.wasm wss://peregrine.kilt.io
- subwasm diff --no-color peregrine-live.wasm /out/peregrine_runtime.compact.wasm | tee /out/peregrine-diff.txt
- mkdir ./out
- mv /out/* ./out/
artifacts:
paths:
- out/*.wasm
- out/*.json
- out/*.txt
expire_in: 12 week
build-wasm-spiritnet:
image:
name: paritytech/srtool:1.70.0
entrypoint: [""]
stage: build
only:
- develop
- master
- /^[0-9]+(?:\.[0-9]+){2}(?:-(rc)*([0-9])+)?$/
script:
- export PACKAGE=spiritnet-runtime
- export RUNTIME_DIR=runtimes/spiritnet
- export PARACHAIN_PALLET_ID=0x50
- export AUTHORIZE_UPGRADE_PREFIX=0x02
- cp -r * /build
- /srtool/build build
- subwasm meta --format=json+scale /out/spiritnet_runtime.compact.wasm > /out/spiritnet-metadata.json
- subwasm get -o spiritnet-live.wasm wss://spiritnet.kilt.io
- subwasm diff --no-color spiritnet-live.wasm /out/spiritnet_runtime.compact.wasm | tee /out/spiritnet-diff.txt
- mkdir ./out
- mv /out/* ./out/
artifacts:
paths:
- out/*.wasm
- out/*.json
- out/*.txt
expire_in: 12 week
build-wasm-try-runtime:
parallel:
matrix:
- RUNTIME: "peregrine"
- RUNTIME: "spiritnet"
image:
name: paritytech/srtool:1.70.0
entrypoint: [""]
stage: build
only:
- develop
- master
- /^[0-9]+(?:\.[0-9]+){2}(?:-(rc)*([0-9])+)?$/
script:
- export PACKAGE=${RUNTIME}-runtime
- export RUNTIME_DIR=runtimes/${RUNTIME}
- export PARACHAIN_PALLET_ID=0x50
- export AUTHORIZE_UPGRADE_PREFIX=0x02
- cp -r * /build
- /srtool/build build --default-features try-runtime
- mkdir ./out
- mv /out/${RUNTIME}_runtime.compact.compressed.wasm ./dangerous_${RUNTIME}.try-runtime.wasm
artifacts:
name: ${RUNTIME}_try-runtime
paths:
- ./dangerous_${RUNTIME}.try-runtime.wasm
expire_in: 12 week