# .gitlab-ci.yml # # ink # # pipelines can be triggered manually in the web stages: - test - build variables: GIT_STRATEGY: fetch 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" RUSTFLAGS: "-C link-dead-code" REGISTRY: registry.parity.io/parity/infrastructure/scripts .collect-artifacts: &collect-artifacts artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" when: on_success expire_in: 7 days paths: - artifacts/ .docker-env: &docker-env image: ${REGISTRY}/ink-ci-linux:latest before_script: - cargo -vV - rustc -vV - rustup show - bash --version - sccache -s only: - master - /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - schedules - web - /^[0-9]+$/ # PRs tags: - linux-docker #### stage: test .check-workspace: stage: test <<: *docker-env script: - ./scripts/check-workspace.sh - check_workspace=$? - if [ $check_workspace -eq 0 ]; then echo "Workspace checks have passed!"; exit 0; else echo "Some workspace checks have not passed!"; exit 1; fi - sccache -s check-workspace: stage: test <<: *docker-env script: - time cargo check --verbose --all --all-features - time cargo check --verbose --all --no-default-features - time cargo fmt --verbose --all -- --check - time cargo clippy --verbose --all --all-features -- -D warnings - time cargo clippy --verbose --all --no-default-features -- -D warnings - time cargo test --verbose --all --all-features - time cargo build --verbose --all --no-default-features --release --target=wasm32-unknown-unknown check-examples: stage: test <<: *docker-env script: - ./scripts/check-examples.sh - check_examples=$? - if [ $check_examples -eq 0 ]; then echo "Examples checks have passed!"; exit 0; else echo "Some examples checks have not passed!"; exit 1; fi - sccache -s # stage: build