mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
[CI] Expose WASM binaries on publish (#1093)
* add build-wasm-release CI job * temporarily run build-wasm-release everywhere * temporary job to inspect artifacts dir * fix test job * fix test job again * remove temporary job * remove FIXME for when to run jobs * remove pointless echo * Change cargo build for wasm-pack * Checksum polkadot_cli files * make separate wasm dir for artifacts * fix nits
This commit is contained in:
+17
-21
@@ -5,7 +5,6 @@
|
|||||||
# pipelines can be triggered manually in the web
|
# pipelines can be triggered manually in the web
|
||||||
# setting DEPLOY_TAG will only deploy the tagged image
|
# setting DEPLOY_TAG will only deploy the tagged image
|
||||||
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
@@ -23,7 +22,6 @@ variables:
|
|||||||
DOCKER_OS: "debian:stretch"
|
DOCKER_OS: "debian:stretch"
|
||||||
ARCH: "x86_64"
|
ARCH: "x86_64"
|
||||||
|
|
||||||
|
|
||||||
.collect-artifacts: &collect-artifacts
|
.collect-artifacts: &collect-artifacts
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||||
@@ -56,8 +54,6 @@ variables:
|
|||||||
- cargo --version
|
- cargo --version
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.build-refs: &build-refs
|
.build-refs: &build-refs
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@@ -100,7 +96,6 @@ check-runtime:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
|
||||||
check-line-width:
|
check-line-width:
|
||||||
stage: test
|
stage: test
|
||||||
image: parity/tools:latest
|
image: parity/tools:latest
|
||||||
@@ -138,7 +133,6 @@ test-linux-stable: &test
|
|||||||
- time cargo test --all --release --verbose --locked --features runtime-benchmarks
|
- time cargo test --all --release --verbose --locked --features runtime-benchmarks
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
|
|
||||||
check-web-wasm: &test
|
check-web-wasm: &test
|
||||||
stage: test
|
stage: test
|
||||||
<<: *test-refs
|
<<: *test-refs
|
||||||
@@ -167,6 +161,22 @@ check-runtime-benchmarks: &test
|
|||||||
- time cargo check --features runtime-benchmarks
|
- time cargo check --features runtime-benchmarks
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
|
build-wasm-release:
|
||||||
|
stage: build
|
||||||
|
<<: *collect-artifacts
|
||||||
|
<<: *docker-env
|
||||||
|
<<: *compiler_info
|
||||||
|
# Note: We likely only want to do this for tagged releases, hence the 'only:'
|
||||||
|
only:
|
||||||
|
# FIXME remove when ready to merge
|
||||||
|
- /^[0-9]+$/
|
||||||
|
# - /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||||
|
script:
|
||||||
|
- time wasm-pack build --target web --out-dir wasm --release cli -- --no-default-features --features browser
|
||||||
|
- mkdir -p ./artifacts/wasm
|
||||||
|
- cd ./cli/wasm/
|
||||||
|
- for f in polkadot_cli*; do sha256sum "${f}" > "${f}.sha256"; done
|
||||||
|
- mv ./polkadot_cli* ../../artifacts/wasm/.
|
||||||
|
|
||||||
build-linux-release: &build
|
build-linux-release: &build
|
||||||
stage: build
|
stage: build
|
||||||
@@ -193,13 +203,11 @@ build-linux-release: &build
|
|||||||
- cp -r scripts/docker/* ./artifacts
|
- cp -r scripts/docker/* ./artifacts
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.publish-build: &publish-build
|
.publish-build: &publish-build
|
||||||
stage: publish
|
stage: publish
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-release
|
- build-linux-release
|
||||||
|
- build-wasm-release
|
||||||
cache: {}
|
cache: {}
|
||||||
<<: *build-refs
|
<<: *build-refs
|
||||||
<<: *kubernetes-env
|
<<: *kubernetes-env
|
||||||
@@ -210,9 +218,6 @@ build-linux-release: &build
|
|||||||
- EXTRATAG="$(cat ./artifacts/EXTRATAG)"
|
- EXTRATAG="$(cat ./artifacts/EXTRATAG)"
|
||||||
- echo "Polkadot version = ${VERSION} (EXTRATAG ${EXTRATAG})"
|
- echo "Polkadot version = ${VERSION} (EXTRATAG ${EXTRATAG})"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
publish-docker-release:
|
publish-docker-release:
|
||||||
<<: *publish-build
|
<<: *publish-build
|
||||||
image: docker:stable
|
image: docker:stable
|
||||||
@@ -243,9 +248,6 @@ publish-docker-release:
|
|||||||
# only VERSION information is needed for the deployment
|
# only VERSION information is needed for the deployment
|
||||||
- find ./artifacts/ -depth -not -name VERSION -not -name artifacts -delete
|
- find ./artifacts/ -depth -not -name VERSION -not -name artifacts -delete
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
publish-s3-release:
|
publish-s3-release:
|
||||||
<<: *publish-build
|
<<: *publish-build
|
||||||
image: parity/awscli:latest
|
image: parity/awscli:latest
|
||||||
@@ -276,12 +278,6 @@ publish-s3-release:
|
|||||||
- aws s3 ls s3://${BUCKET}/${PREFIX}/${EXTRATAG}/
|
- aws s3 ls s3://${BUCKET}/${PREFIX}/${EXTRATAG}/
|
||||||
--recursive --human-readable --summarize
|
--recursive --human-readable --summarize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deploy-polkasync-kusama:
|
deploy-polkasync-kusama:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
<<: *build-refs
|
<<: *build-refs
|
||||||
|
|||||||
Reference in New Issue
Block a user