Skip to content

Commit 03a8eee

Browse files
authored
Dependency upgrades, version bump, example structure, cargo-contract sync, CI fix (use-ink#2379)
* Bump version to `6.0.0-alpha` * Remove relative deps * Apply `cargo fmt` * Bump `polkavm-derive` to `0.19.0` * Fix CI * Fix CI * Fix CI * Fix CI * Adapt `complex-storage-structures` to ink! 6 * Debug CI * Fix `codecov` stage of CI * Remove debug output
1 parent 8bb83d7 commit 03a8eee

File tree

84 files changed

+209
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+209
-234
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "cargo"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
# ignore Substrate pallets major updates.
88
# automated Substrate releases cause dependabot PR spam, so these must be updated manually when required.
99
ignore:

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ env:
2929
# Image can be edited at https://github.com/use-ink/docker-images
3030
IMAGE: useink/ci
3131
CARGO_TARGET_DIR: /ci-cache/${{ github.repository }}/targets/${{ github.ref_name }}/${{ github.job }}
32-
CARGO_INCREMENTAL: 0
3332
PURELY_STD_CRATES: ink/codegen metadata engine e2e e2e/macro ink/ir
3433
ALSO_RISCV_CRATES: env storage storage/traits allocator prelude primitives ink ink/macro
3534
# TODO `cargo clippy --all-targets --all-features` for this crate
@@ -405,7 +404,7 @@ jobs:
405404
run: |
406405
for package in $(cargo metadata --format-version 1 | jq -r '.workspace_members[]' | awk '{print $1}'); do
407406
# Run cargo doc for each workspace member
408-
cargo doc --no-deps --all-features -p ${package}
407+
cargo +nightly doc --no-deps --all-features -p ${package}
409408
done
410409
mv ${CARGO_TARGET_DIR}/doc ./crate-docs
411410
# FIXME: remove me after CI image gets nonroot
@@ -443,9 +442,11 @@ jobs:
443442
# Needed because `codecov` requires nightly features to work
444443
# (see `-Z` in the `RUSTFLAGS` below).
445444
RUSTC_BOOTSTRAP: 1
445+
RUSTDOCFLAGS: -Cpanic=abort
446446
# Variables partly came from https://github.com/mozilla/grcov/blob/master/README.md
447-
RUSTFLAGS: -Zprofile -Zmir-opt-level=0 -Ccodegen-units=1
448-
-Clink-dead-code -Copt-level=0 -Coverflow-checks=off
447+
RUSTFLAGS: -Zmir-opt-level=0 -Ccodegen-units=1
448+
-Clink-dead-code -Copt-level=0 -Coverflow-checks=off
449+
-Cinstrument-coverage -Zpanic_abort_tests
449450
# The `cargo-tarpaulin` coverage reporting tool seems to have better code instrumentation and thus
450451
# produces better results for Rust codebases in general. However, unlike `grcov` it requires
451452
# running docker with `--security-opt seccomp=unconfined` which is why we use `grcov` instead.
@@ -462,8 +463,9 @@ jobs:
462463
# FIXME: Access from 2 users, should be solved once ci-image works from a non-root user
463464
git config --global --add safe.directory '*'
464465
# RUSTFLAGS are the cause target cache can't be used here
465-
cargo build --all-features --workspace
466-
cargo test --all-features --no-fail-fast --workspace --locked -- --skip ui_tests
466+
rustup component add llvm-tools-preview
467+
cargo +nightly build --all-features --workspace
468+
cargo +nightly test --all-features --no-fail-fast --workspace --locked -- --skip ui_tests
467469
# coverage with branches
468470
grcov . --binary-path ./target/debug/ --source-dir . --output-type lcov --llvm --branch \
469471
--ignore-not-existing --ignore "/*" --ignore "tests/*" --output-path lcov-w-branch.info
@@ -503,7 +505,7 @@ jobs:
503505
with:
504506
# run all tests with --all-features, which will run the e2e-tests feature if present
505507
args:
506-
/bin/bash -c "scripts/for_all_contracts_exec.sh --path integration-tests --ignore public/static-buffer --ignore public/mapping --partition ${{ matrix.partition }}/6 -- \
508+
/bin/bash -c "scripts/for_all_contracts_exec.sh --path integration-tests --ignore internal/static-buffer --ignore internal/mapping --partition ${{ matrix.partition }}/6 -- \
507509
cargo +nightly test --all-features --all --manifest-path {}"
508510

509511
examples-test-mapping:
@@ -537,7 +539,7 @@ jobs:
537539
run:
538540
rustup install nightly-2025-01-07;
539541
rustup component add rust-src --toolchain nightly-2025-01-07;
540-
cargo +nightly-2024-11-28 test --all-features --all --manifest-path integration-tests/public/mapping/Cargo.toml
542+
cargo +nightly-2024-11-28 test --all-features --all --manifest-path integration-tests/internal/mapping/Cargo.toml
541543

542544
examples-custom-test:
543545
runs-on: ubuntu-latest
@@ -569,8 +571,8 @@ jobs:
569571
# run the static buffer test with a custom buffer size.
570572
# the readme + test comments explain why `32`, in short because the tests write
571573
# content into the buffer and want to provoke an exhaustion of the buffer.
572-
cargo clean --manifest-path integration-tests/public/static-buffer/Cargo.toml
573-
INK_STATIC_BUFFER_SIZE=32 cargo +nightly test --manifest-path integration-tests/public/static-buffer/Cargo.toml --all-features
574+
cargo clean --manifest-path integration-tests/internal/static-buffer/Cargo.toml
575+
INK_STATIC_BUFFER_SIZE=32 cargo +nightly test --manifest-path integration-tests/internal/static-buffer/Cargo.toml --all-features
574576
575577
- name: Run E2E test with on-chain contract
576578
# todo disabled until `cargo-contract` supports mapping the account

.github/workflows/measurements.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
5353
# Measure contract sizes for the current branch
5454
mkdir ${MEASUREMENTS_DIR}
55-
${SCRIPTS_DIR}/for_all_contracts_exec.sh --path integration-tests --quiet -- ${SCRIPTS_DIR}/contract_size.sh {} > ${CONTRACT_SIZES}
55+
# todo remove ignoring `complex-storage-structures`
56+
${SCRIPTS_DIR}/for_all_contracts_exec.sh --path integration-tests --ignore public/complex-storage-structures --quiet -- ${SCRIPTS_DIR}/contract_size.sh {} > ${CONTRACT_SIZES}
5657
sed -ie 's/^integration-tests\/\(public\/\|internal\/\)\?//' ${CONTRACT_SIZES}
5758
5859
CARGO_CONTRACT_VERSION=$(cargo contract --version | egrep --only-matching "cargo-contract.* .*-x86" | sed -s 's/-x86//')

Cargo.lock

Lines changed: 36 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)