# .gitlab-ci.yml # # ink # # pipelines can be triggered manually in the web stages: - check-workspace - examples 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: check-workspace cargo-check-af: stage: check-workspace <<: *docker-env script: - cargo check --verbose --all --all-features cargo-check-nf: stage: check-workspace <<: *docker-env script: - cargo check --verbose --all --no-default-features cargo-fmt: stage: check-workspace <<: *docker-env script: - cargo fmt --verbose --all -- --check cargo-clippy-af: stage: check-workspace <<: *docker-env script: - cargo clippy --verbose --all --all-features -- -D warnings cargo-clippy-nf: stage: check-workspace <<: *docker-env script: - cargo clippy --verbose --all --no-default-features -- -D warnings cargo-test-af: stage: check-workspace <<: *docker-env script: - cargo test --verbose --all --all-features cargo-build-nf: stage: check-workspace <<: *docker-env script: - cargo build --verbose --all --no-default-features --release --target=wasm32-unknown-unknown #### stage: examples examples-wasm: stage: examples <<: *docker-env script: - for example in $(ls examples/lang); do cargo build --release --no-default-features --target=wasm32-unknown-unknown --verbose --manifest-path examples/lang/$example/Cargo.toml; done - sccache -s examples-test: stage: examples <<: *docker-env script: - for example in $(ls examples/lang); do cargo test --verbose --manifest-path examples/lang/$example/Cargo.toml; done - sccache -s examples-abi: stage: examples <<: *docker-env script: - for example in $(ls examples/lang); do cargo run --package abi-gen --manifest-path examples/lang/$example/Cargo.toml; done - sccache -s