Commit 0fabc87a authored by Denis_P's avatar Denis_P 🤸 Committed by GitHub

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:
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "3"
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_INCREMENTAL: 0
CI_SERVER_NAME: "GitLab CI"
REGISTRY: registry.parity.io/parity/infrastructure/scripts
......@@ -44,6 +44,8 @@ variables:
- schedules
- web
- /^[0-9]+$/ # PRs
dependencies: []
interruptible: true
retry:
max: 2
when:
......@@ -72,12 +74,13 @@ check-wasm:
cargo check --verbose --no-default-features --target wasm32-unknown-unknown --manifest-path ${crate}/Cargo.toml;
done
#### stage: workspace
build-std:
stage: workspace
<<: *docker-env
dependencies:
needs:
- check-std
script:
- for crate in ${ALL_CRATES}; do
......@@ -87,7 +90,7 @@ build-std:
build-wasm:
stage: workspace
<<: *docker-env
dependencies:
needs:
- check-wasm
script:
- for crate in ${ALL_CRATES}; do
......@@ -97,7 +100,7 @@ build-wasm:
test:
stage: workspace
<<: *docker-env
dependencies:
needs:
- check-std
script:
- for crate in ${ALL_CRATES}; do
......@@ -107,7 +110,7 @@ test:
clippy-std:
stage: workspace
<<: *docker-env
dependencies:
needs:
- check-std
script:
- for crate in ${ALL_CRATES}; do
......@@ -117,7 +120,7 @@ clippy-std:
clippy-wasm:
stage: workspace
<<: *docker-env
dependencies:
needs:
- check-wasm
script:
- for crate in ${ALL_CRATES}; do
......@@ -133,6 +136,11 @@ fmt:
#### 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:
stage: examples
<<: *docker-env
......@@ -169,6 +177,7 @@ examples-contract-build:
stage: examples
<<: *docker-env
script:
- *update-cargo-contract
- for example in examples/lang2/*; do
pushd $example &&
cargo contract build &&
......@@ -179,6 +188,7 @@ examples-generate-metadata:
stage: examples
<<: *docker-env
script:
- *update-cargo-contract
- for example in examples/lang2/*; do
pushd $example &&
cargo contract generate-metadata &&
......
Markdown is supported
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