Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Invoke cargo build commands with --locked (#7057)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mira Ressel authored Apr 12, 2023
1 parent ecad912 commit 171afae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions scripts/ci/gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-linux-stable:
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
script:
- time cargo build --profile testnet --features pyroscope --verbose --bin polkadot
- time cargo build --locked --profile testnet --features pyroscope --verbose --bin polkadot
# pack artifacts
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
Expand Down Expand Up @@ -52,8 +52,8 @@ build-test-collators:
- .compiler-info
- .collect-artifacts
script:
- time cargo build --profile testnet --verbose -p test-parachain-adder-collator
- time cargo build --profile testnet --verbose -p test-parachain-undying-collator
- time cargo build --locked --profile testnet --verbose -p test-parachain-adder-collator
- time cargo build --locked --profile testnet --verbose -p test-parachain-undying-collator
# pack artifacts
- mkdir -p ./artifacts
- mv ./target/testnet/adder-collator ./artifacts/.
Expand All @@ -77,7 +77,7 @@ build-malus:
- .compiler-info
- .collect-artifacts
script:
- time cargo build --profile testnet --verbose -p polkadot-test-malus
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus
# pack artifacts
- mkdir -p ./artifacts
- mv ./target/testnet/malus ./artifacts/.
Expand Down
10 changes: 5 additions & 5 deletions scripts/ci/gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ check-try-runtime:
- .compiler-info
script:
# Check that everything compiles with `try-runtime` feature flag.
- cargo check --features try-runtime --all
- cargo check --locked --features try-runtime --all

# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
# Works only in PRs with E1 label
Expand All @@ -68,8 +68,8 @@ check-try-runtime:
echo "Found label runtime_migration. Running tests"
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Running try-runtime for ${NETWORK} ----------"
time cargo build --release -p "$NETWORK"-runtime
time cargo run --release --features try-runtime try-runtime \
time cargo build --locked --release -p "$NETWORK"-runtime
time cargo run ---locked -release --features try-runtime try-runtime \
--runtime ./target/release/wbuild/"$NETWORK"-runtime/target/wasm32-unknown-unknown/release/"$NETWORK"_runtime.wasm \
-lruntime=debug \
--chain=${NETWORK}-dev \
Expand Down Expand Up @@ -118,8 +118,8 @@ check-no-default-features:
- .compiler-info
script:
# Check that polkadot-cli will compile no default features.
- pushd ./node/service && cargo check --no-default-features && popd
- pushd ./cli && cargo check --no-default-features --features "service" && popd
- pushd ./node/service && cargo check --locked --no-default-features && popd
- pushd ./cli && cargo check --locked --no-default-features --features "service" && popd
- exit 0

# this is artificial job to run some build and tests using DAG
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ cargo-clippy:
- .docker-env
- .test-refs
script:
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --all-targets
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --locked --all-targets

0 comments on commit 171afae

Please sign in to comment.