Unverified Commit 0fabc87a authored by Denis_P's avatar Denis_P 🏑 Committed by GitHub
Browse files

Sccache, needs, CLI update (#277)

* cli is built and sent to examples; cleanup CI

* fix artifact location

* fix script

* 'install' cargo-contract

* save before merge

* GIT_DEPTH and some hackery

* typo

* fix artifacts

* test

* test2

* test3

* build contract from it's repo

* typo

* fix build

* build won't work inside git repo. Install --root ftw

* fix build

* fix build n

* fix artifacts

* cleanup and ready to go

* contract is returned to dockerfile

* cargo install should have not given error when version matches

* comment, anchor

* typo

* less dupes
parent 76c10bd1
Pipeline #70489 passed with stages
in 7 minutes and 54 seconds
...@@ -12,8 +12,8 @@ stages: ...@@ -12,8 +12,8 @@ stages:
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
GIT_DEPTH: "3"
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}" CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_INCREMENTAL: 0 CARGO_INCREMENTAL: 0
CI_SERVER_NAME: "GitLab CI" CI_SERVER_NAME: "GitLab CI"
REGISTRY: registry.parity.io/parity/infrastructure/scripts REGISTRY: registry.parity.io/parity/infrastructure/scripts
...@@ -44,6 +44,8 @@ variables: ...@@ -44,6 +44,8 @@ variables:
- schedules - schedules
- web - web
- /^[0-9]+$/ # PRs - /^[0-9]+$/ # PRs
dependencies: []
interruptible: true
retry: retry:
max: 2 max: 2
when: when:
...@@ -72,12 +74,13 @@ check-wasm: ...@@ -72,12 +74,13 @@ check-wasm:
cargo check --verbose --no-default-features --target wasm32-unknown-unknown --manifest-path ${crate}/Cargo.toml; cargo check --verbose --no-default-features --target wasm32-unknown-unknown --manifest-path ${crate}/Cargo.toml;
done done
#### stage: workspace #### stage: workspace
build-std: build-std:
stage: workspace stage: workspace
<<: *docker-env <<: *docker-env
dependencies: needs:
- check-std - check-std
script: script:
- for crate in ${ALL_CRATES}; do - for crate in ${ALL_CRATES}; do
...@@ -87,7 +90,7 @@ build-std: ...@@ -87,7 +90,7 @@ build-std:
build-wasm: build-wasm:
stage: workspace stage: workspace
<<: *docker-env <<: *docker-env
dependencies: needs:
- check-wasm - check-wasm
script: script:
- for crate in ${ALL_CRATES}; do - for crate in ${ALL_CRATES}; do
...@@ -97,7 +100,7 @@ build-wasm: ...@@ -97,7 +100,7 @@ build-wasm:
test: test:
stage: workspace stage: workspace
<<: *docker-env <<: *docker-env
dependencies: needs:
- check-std - check-std
script: script:
- for crate in ${ALL_CRATES}; do - for crate in ${ALL_CRATES}; do
...@@ -107,7 +110,7 @@ test: ...@@ -107,7 +110,7 @@ test:
clippy-std: clippy-std:
stage: workspace stage: workspace
<<: *docker-env <<: *docker-env
dependencies: needs:
- check-std - check-std
script: script:
- for crate in ${ALL_CRATES}; do - for crate in ${ALL_CRATES}; do
...@@ -117,7 +120,7 @@ clippy-std: ...@@ -117,7 +120,7 @@ clippy-std:
clippy-wasm: clippy-wasm:
stage: workspace stage: workspace
<<: *docker-env <<: *docker-env
dependencies: needs:
- check-wasm - check-wasm
script: script:
- for crate in ${ALL_CRATES}; do - for crate in ${ALL_CRATES}; do
...@@ -133,6 +136,11 @@ fmt: ...@@ -133,6 +136,11 @@ fmt:
#### stage: examples #### stage: examples
.update-cargo-contract: &update-cargo-contract
# `cargo install` returns an error if there is nothing to update, so have to supress it here temporarily
- cargo install --git https://github.com/paritytech/cargo-contract || echo $?
- cargo contract -V
examples-test: examples-test:
stage: examples stage: examples
<<: *docker-env <<: *docker-env
...@@ -169,6 +177,7 @@ examples-contract-build: ...@@ -169,6 +177,7 @@ examples-contract-build:
stage: examples stage: examples
<<: *docker-env <<: *docker-env
script: script:
- *update-cargo-contract
- for example in examples/lang2/*; do - for example in examples/lang2/*; do
pushd $example && pushd $example &&
cargo contract build && cargo contract build &&
...@@ -179,6 +188,7 @@ examples-generate-metadata: ...@@ -179,6 +188,7 @@ examples-generate-metadata:
stage: examples stage: examples
<<: *docker-env <<: *docker-env
script: script:
- *update-cargo-contract
- for example in examples/lang2/*; do - for example in examples/lang2/*; do
pushd $example && pushd $example &&
cargo contract generate-metadata && cargo contract generate-metadata &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment