Cache dependencies for all features in grid-dev
@@ -87,12 +87,30 @@ COPY contracts/schema/Cargo.toml /build/contracts/schema/Cargo.toml
COPY contracts/track_and_trace/Cargo.toml /build/contracts/track_and_trace/Cargo.toml
# Do release builds for each Cargo.toml
-RUN find . -name 'Cargo.toml'| xargs -I '{}' \
- cargo build --release --manifest-path '{}'
+RUN find ./*/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=experimental"
+
+RUN find ./*/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=stable"
+
+RUN find ./*/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=default"
+
+RUN find ./*/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --no-default-features"
# Do wasm builds for the contracts
-RUN find contracts -name 'Cargo.toml' | xargs -I '{}' \
- cargo build --release --target wasm32-unknown-unknown --manifest-path '{}'
+RUN find ./contracts/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=experimental"
+
+RUN find ./contracts/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=stable"
+
+RUN find ./contracts/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --features=default"
+
+RUN find ./contracts/ -name 'Cargo.toml' | \
+ xargs -I '{}' sh -c "echo 'Building {}'; cargo build --tests --release --manifest-path {} --no-default-features"
# Clean up built files
RUN rm -f \
