Skip to content

Commit

Permalink
chore!: Stabilize lazy-pages feature (#3123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f authored Sep 18, 2023
1 parent 65a7177 commit 012c1eb
Show file tree
Hide file tree
Showing 45 changed files with 428 additions and 1,150 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ jobs:
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
--release
upload:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ jobs:
run: curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: "Build: Node"
run: >-
cargo build
-p gear-cli --features=lazy-pages
run: cargo build -p gear-cli

- name: "Test: Lazy pages"
run: >-
cargo nextest run
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ jobs:
- name: "Check: Vara runtime imports"
run: ./target/release/wasm-proc --check-runtime-imports target/release/wbuild/vara-runtime/vara_runtime.compact.wasm

- name: "Test: Gear pallet tests with lazy pages"
run: ./scripts/gear.sh test pallet --features lazy-pages --release --locked

- name: "Test: Gear workspace"
run: ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages --release --locked
run: ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --release --locked

- name: "Test: gsdk tests"
run: ./scripts/gear.sh test gsdk --release
Expand Down Expand Up @@ -252,7 +249,6 @@ jobs:
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
--features=lazy-pages
--release
env:
CARGO_BUILD_TARGET: x86_64-pc-windows-msvc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
tar -xf /cache/check_cargo_registry_${{ github.ref_name }}.tar -C /
- name: "Build: Gear"
run: ./scripts/gear.sh build gear --release --locked --features=dev,runtime-benchmarks,lazy-pages
run: ./scripts/gear.sh build gear --release --locked --features=dev,runtime-benchmarks

- name: "Collect: Gear workspace tests"
run: |
mkdir -p ./target/analysis/tests/
mkdir -p ./target/analysis/output/
for i in `seq 1 $COUNT`; do echo $i; ./scripts/gear.sh test gear --exclude gclient --exclude gcli --features pallet-gear-debug/lazy-pages --release -j1 > ./target/analysis/output/$i 2>&1 ; mv ./target/nextest/ci/junit.xml ./target/analysis/tests/$i; done
for i in `seq 1 $COUNT`; do echo $i; ./scripts/gear.sh test gear --exclude gclient --exclude gcli --release -j1 > ./target/analysis/output/$i 2>&1 ; mv ./target/nextest/ci/junit.xml ./target/analysis/tests/$i; done
./target/release/regression-analysis collect-data --data-folder-path ./target/analysis/tests/ --output-path ./target/pallet-tests.json
- name: "Generate report: Gear workspace tests"
Expand Down
8 changes: 7 additions & 1 deletion Cargo.lock

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

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ node-release:

.PHONY: vara
vara:
@ ./scripts/gear.sh build node --no-default-features --features=vara-native,lazy-pages
@ ./scripts/gear.sh build node --no-default-features --features=vara-native

.PHONY: vara-release
vara-release:
@ ./scripts/gear.sh build node --release --no-default-features --features=vara-native,lazy-pages
@ ./scripts/gear.sh build node --release --no-default-features --features=vara-native

.PHONY: gear-replay
gear-replay:
Expand Down Expand Up @@ -197,13 +197,13 @@ test-doc:
test-gear: #\
We use lazy-pages feature for pallet-gear-debug due to cargo building issue \
and fact that pallet-gear default is lazy-pages.
@ ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages
@ ./scripts/gear.sh test gear --exclude gclient --exclude gcli --exclude gsdk

.PHONY: test-gear-release
test-gear-release: # \
We use lazy-pages feature for pallet-gear-debug due to cargo building issue \
and fact that pallet-gear default is lazy-pages.
@ ./scripts/gear.sh test gear --release --exclude gclient --exclude gcli --exclude gsdk --features pallet-gear-debug/lazy-pages
@ ./scripts/gear.sh test gear --release --exclude gclient --exclude gcli --exclude gsdk

.PHONY: test-gsdk
test-gsdk: node-release
Expand Down
6 changes: 4 additions & 2 deletions core-processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gear-core.workspace = true
gear-core-errors = { workspace = true, features = ["codec"] }
gear-backend-common.workspace = true
gear-wasm-instrument.workspace = true
gear-lazy-pages-common.workspace = true

scale-info = { workspace = true, features = ["derive"] }
log.workspace = true
Expand All @@ -23,10 +24,11 @@ static_assertions.workspace = true
actor-system-error.workspace = true

[dev-dependencies]
proptest.workspace = true
env_logger.workspace = true
enum-iterator.workspace = true

[features]
default = ["std"]
std = ["gear-lazy-pages-common/std"]
strict = []
mock = []
mock = []
2 changes: 0 additions & 2 deletions core-processor/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ pub struct WasmExecutionContext {
pub gas_reserver: GasReserver,
/// Program to be executed.
pub program: Program,
/// Memory pages with initial data.
pub pages_initial_data: BTreeMap<GearPage, PageBuf>,
/// Size of the memory block.
pub memory_size: WasmPage,
}
Expand Down
Loading

0 comments on commit 012c1eb

Please sign in to comment.