Skip to content

Commit

Permalink
Merge pull request #2149 from CosmWasm/remove-core
Browse files Browse the repository at this point in the history
Rework `cosmwasm-core`
  • Loading branch information
aumetra authored Jun 4, 2024
2 parents 3a6613f + 417f675 commit e4445bf
Show file tree
Hide file tree
Showing 83 changed files with 963 additions and 1,380 deletions.
122 changes: 59 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ workflows:
# Keep those job names in sync with .mergify.yml
jobs:
- arm64
- package_core
- package_crypto
- package_check
- package_core
- package_schema
- package_schema_derive
- package_std
Expand Down Expand Up @@ -238,38 +238,63 @@ jobs:
- contracts/staking/target/wasm32-unknown-unknown/release/build
- contracts/staking/target/wasm32-unknown-unknown/release/deps

package_crypto:
package_core:
docker:
- image: rust:1.74
environment:
# Limit the number of parallel jobs to avoid OOM crashes during doc testing
RUST_TEST_THREADS: 8
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-package_crypto-rust:1.74-{{ checksum "Cargo.lock" }}
- cargocache-v2-package_core-rust:1.74-{{ checksum "Cargo.lock" }}
- run:
name: Build (no features)
working_directory: ~/project/packages/crypto
name: Add thumbv7em-none-eabi target
command: rustup target add thumbv7em-none-eabi && rustup target list --installed
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
- run:
name: Build library for native target (no features)
working_directory: ~/project/packages/core
command: cargo build --locked --no-default-features
- run:
name: Build (all features)
working_directory: ~/project/packages/crypto
command: cargo build --locked --features std
name: Build library for wasm target (no features)
working_directory: ~/project/packages/core
command: cargo wasm --locked --no-default-features
- run:
name: Run tests
working_directory: ~/project/packages/crypto
command: cargo test --locked --features std
name: Build library for no_std target (no features)
working_directory: ~/project/packages/core
command: cargo no-std --locked --no-default-features
- run:
name: Run unit tests (no features)
working_directory: ~/project/packages/core
command: cargo test --locked --no-default-features
- run:
name: Build library for native target (all features)
working_directory: ~/project/packages/core
command: cargo build --locked --all-features
- run:
name: Build library for wasm target (all features)
working_directory: ~/project/packages/core
command: cargo wasm --locked --all-features
- run:
name: Run unit tests (all features)
working_directory: ~/project/packages/core
command: cargo test --locked --all-features
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-package_crypto-rust:1.74-{{ checksum "Cargo.lock" }}
key: cargocache-v2-package_core-rust:1.74-{{ checksum "Cargo.lock" }}

package_check:
package_crypto:
docker:
- image: rust:1.74
steps:
Expand All @@ -279,78 +304,49 @@ jobs:
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-package_check-rust:1.74-{{ checksum "Cargo.lock" }}
- cargocache-v2-package_crypto-rust:1.74-{{ checksum "Cargo.lock" }}
- run:
name: Build
working_directory: ~/project/packages/check
working_directory: ~/project/packages/crypto
command: cargo build --locked
- run:
name: Run tests
working_directory: ~/project/packages/check
working_directory: ~/project/packages/crypto
command: cargo test --locked
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-package_check-rust:1.74-{{ checksum "Cargo.lock" }}
key: cargocache-v2-package_crypto-rust:1.74-{{ checksum "Cargo.lock" }}

package_core:
package_check:
docker:
- image: rust:1.74
environment:
# Limit the number of parallel jobs to avoid OOM crashes during doc testing
RUST_TEST_THREADS: 8
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-package_core-rust:1.74-{{ checksum "Cargo.lock" }}
- run:
name: Add thumbv7em-none-eabi target
command: rustup target add thumbv7em-none-eabi && rustup target list --installed
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
- run:
name: Build library for native target (no features)
working_directory: ~/project/packages/core
command: cargo build --locked --no-default-features
- run:
name: Build library for wasm target (no features)
working_directory: ~/project/packages/core
command: cargo wasm --locked --no-default-features
- run:
name: Build library for no_std target (no features)
working_directory: ~/project/packages/core
command: cargo no-std --locked --no-default-features
- run:
name: Run unit tests (no features)
working_directory: ~/project/packages/core
command: cargo test --locked --no-default-features
- run:
name: Build library for native target (all features)
working_directory: ~/project/packages/core
command: cargo build --locked --features std
- cargocache-v2-package_check-rust:1.74-{{ checksum "Cargo.lock" }}
- run:
name: Build library for wasm target (all features)
working_directory: ~/project/packages/core
command: cargo wasm --locked --features std
name: Build
working_directory: ~/project/packages/check
command: cargo build --locked
- run:
name: Run unit tests (all features)
working_directory: ~/project/packages/core
command: cargo test --locked --features std
name: Run tests
working_directory: ~/project/packages/check
command: cargo test --locked
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-package_core-rust:1.74-{{ checksum "Cargo.lock" }}
key: cargocache-v2-package_check-rust:1.74-{{ checksum "Cargo.lock" }}

package_schema:
docker:
Expand Down Expand Up @@ -1006,6 +1002,14 @@ jobs:
#
# Workspace packages
#
- run:
name: Clippy linting on core (no feature flags)
working_directory: ~/project/packages/core
command: cargo clippy --all-targets -- -D warnings
- run:
name: Clippy linting on core (all feature flags)
working_directory: ~/project/packages/core
command: cargo clippy --all-features --all-targets -- -D warnings
- run:
name: Clippy linting on crypto
working_directory: ~/project/packages/crypto
Expand All @@ -1022,14 +1026,6 @@ jobs:
name: Clippy linting on schema-derive
working_directory: ~/project/packages/schema-derive
command: cargo clippy --all-targets --tests -- -D warnings
- run:
name: Clippy linting on core (no feature flags)
working_directory: ~/project/packages/core
command: cargo clippy --all-targets -- -D warnings
- run:
name: Clippy linting on core (all feature flags)
working_directory: ~/project/packages/core
command: cargo clippy --all-features --all-targets -- -D warnings
- run:
name: Clippy linting on std (no feature flags)
working_directory: ~/project/packages/std
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
toolchain: 1.74.0
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- name: "Cache build artifacts"
uses: Swatinem/rust-cache@v2
- name: Check workspace
run: ./devtools/check_workspace.sh

Expand All @@ -35,5 +37,7 @@ jobs:
with:
toolchain: 1.74.0
components: rustfmt
- name: "Cache build artifacts"
uses: Swatinem/rust-cache@v2
- name: Test workspace
run: ./devtools/test_workspace.sh
22 changes: 4 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 4 additions & 14 deletions contracts/burner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 4 additions & 14 deletions contracts/crypto-verify/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e4445bf

Please sign in to comment.