From 248e95999a1526785c602f318ed817748a3cc5ee Mon Sep 17 00:00:00 2001 From: BradleyOlson64 Date: Mon, 5 Aug 2024 12:30:54 -0700 Subject: [PATCH] Changing releases to build with profile=prod --- .github/bench.sh | 4 ++-- .github/workflows/release.yml | 10 +++++----- Dockerfile | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/bench.sh b/.github/bench.sh index 6b8fac22f..4791ae4f6 100755 --- a/.github/bench.sh +++ b/.github/bench.sh @@ -32,11 +32,11 @@ mkdir -p "pallets/$PALLET/src" if [[ $BUILD -eq 0 ]] then - cargo $COMMAND --release --features runtime-benchmarks || exit 1; + cargo $COMMAND --profile=production --features runtime-benchmarks || exit 1; fi if [[ $BENCH -eq 0 ]] then - ./target/release/creditcoin3-node benchmark pallet --chain dev --steps="$STEPS" --repeat="$REPEAT" --pallet "pallet_$PALLET" --extrinsic='*' --wasm-execution=compiled --heap-pages=10000 --output "$OUTPUT" + ./target/production/creditcoin3-node benchmark pallet --chain dev --steps="$STEPS" --repeat="$REPEAT" --pallet "pallet_$PALLET" --extrinsic='*' --wasm-execution=compiled --heap-pages=10000 --output "$OUTPUT" sed -i "s/pallet_$PALLET/crate/" "$OUTPUT" fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f3b2f76d..db940db7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -111,7 +111,7 @@ jobs: uses: gluwa/cargo@dev with: command: build - args: --release ${{ needs.setup.outputs.build_options}} + args: --profile=production ${{ needs.setup.outputs.build_options}} - name: Build MacOS aarch64 target if: matrix.operating-system == 'macos-11' @@ -119,14 +119,14 @@ jobs: uses: gluwa/cargo@dev with: command: build - args: --release --target aarch64-apple-darwin + args: --profile=production --target aarch64-apple-darwin - name: Compress continue-on-error: true uses: thedoctor0/zip-release@0.7.6 with: type: "zip" - directory: "target/release/" + directory: "target/production/" path: "creditcoin3-node*" filename: "../../creditcoin-${{ needs.sanity-check.outputs.TAG_NAME }}-${{ env.PLATFORM }}.zip" exclusions: "creditcoin3-node.d" @@ -137,7 +137,7 @@ jobs: uses: thedoctor0/zip-release@0.7.6 with: type: "zip" - directory: "target/aarch64-apple-darwin/release/" + directory: "target/aarch64-apple-darwin/production/" path: "creditcoin3-node*" filename: "../../../creditcoin-${{ needs.sanity-check.outputs.TAG_NAME }}-aarch64-apple-darwin.zip" exclusions: "creditcoin3-node.d" @@ -167,7 +167,7 @@ jobs: id: srtool_build uses: chevdor/srtool-actions@v0.8.0 env: - BUILD_OPTS: "--release ${{ needs.setup.outputs.build_options }}" + BUILD_OPTS: "--profile=production ${{ needs.setup.outputs.build_options }}" with: chain: "creditcoin" runtime_dir: runtime diff --git a/Dockerfile b/Dockerfile index 2e4e4eb21..4d0fc6ccf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | /bin/sh -s -- -y COPY --chown=creditcoin:creditcoin . /creditcoin-node/ # shellcheck source=/dev/null RUN source ~/.cargo/env && \ - cargo build --release ${BUILD_ARGS} + cargo build --profile=production ${BUILD_ARGS} FROM devel-base AS cli-builder @@ -45,7 +45,7 @@ EXPOSE 9944 9933 9615 ENTRYPOINT [ "/bin/creditcoin3-node" ] COPY --from=cli-builder --chown=creditcoin:creditcoin /creditcoin-node/cli/creditcoin-v*.tgz /creditcoin-node/ -COPY --from=rust-builder --chown=creditcoin:creditcoin /creditcoin-node/target/release/creditcoin3-node /bin/creditcoin3-node +COPY --from=rust-builder --chown=creditcoin:creditcoin /creditcoin-node/target/production/creditcoin3-node /bin/creditcoin3-node COPY --from=rust-builder --chown=creditcoin:creditcoin /creditcoin-node/chainspecs / USER 0