Skip to content

Commit

Permalink
Changing releases to build with profile=prod
Browse files Browse the repository at this point in the history
  • Loading branch information
BradleyOlson64 committed Aug 5, 2024
1 parent 0857733 commit 248e959
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,22 @@ 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'
continue-on-error: true
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/[email protected]
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"
Expand All @@ -137,7 +137,7 @@ jobs:
uses: thedoctor0/[email protected]
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"
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
id: srtool_build
uses: chevdor/[email protected]
env:
BUILD_OPTS: "--release ${{ needs.setup.outputs.build_options }}"
BUILD_OPTS: "--profile=production ${{ needs.setup.outputs.build_options }}"
with:
chain: "creditcoin"
runtime_dir: runtime
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 248e959

Please sign in to comment.